diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..9e6febff --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/clang", + "cStandard": "c17", + "cppStandard": "c++14", + "intelliSenseMode": "linux-clang-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..5625b9d4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug test_smoother", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/tests/test_smoother", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/build/tests", + "environment": [], + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..baf277a5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,88 @@ +{ + "files.associations": { + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "any": "cpp", + "array": "cpp", + "atomic": "cpp", + "hash_map": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "chrono": "cpp", + "complex": "cpp", + "condition_variable": "cpp", + "cstdint": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "map": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "optional": "cpp", + "ratio": "cpp", + "set": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "cinttypes": "cpp", + "typeindex": "cpp", + "typeinfo": "cpp", + "variant": "cpp", + "__bit_reference": "cpp", + "__config": "cpp", + "__debug": "cpp", + "__functional_base": "cpp", + "__hash_table": "cpp", + "__locale": "cpp", + "__mutex_base": "cpp", + "__nullptr": "cpp", + "__split_buffer": "cpp", + "__string": "cpp", + "__threading_support": "cpp", + "__tree": "cpp", + "__tuple": "cpp", + "ios": "cpp", + "locale": "cpp", + "queue": "cpp", + "codecvt": "cpp", + "filesystem": "cpp", + "stack": "cpp", + "random": "cpp", + "__functional_03": "cpp", + "numeric": "cpp", + "__memory": "cpp" + } +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 57ca070b..773fd8ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,121 +1,112 @@ -cmake_minimum_required(VERSION 3.16.3) - -project(GMGPolar VERSION 1.0.0) +cmake_minimum_required(VERSION 3.18) +project(GMGPolarGPU LANGUAGES CXX CUDA) option(GMGPOLAR_BUILD_TESTS "Build GMGPolar unit tests." ON) -option(GMGPOLAR_USE_MUMPS "Use MUMPS to compute matrix factorizations." OFF) -option(GMGPOLAR_USE_LIKWID "Use LIKWID to measure code (regions)." OFF) - - -set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -set(CMAKE_CXX_FLAGS "") -set(CMAKE_LINKER_FLAGS "") - -add_subdirectory(src) - -# code coverage analysis -# Note: this only works under linux and with make -# Ninja creates different directory names which do not work together with this scrupt -# as STREQUAL is case-sensitive https://github.com/TriBITSPub/TriBITS/issues/131, also allow DEBUG as accepted input -option(GMGPOLAR_TEST_COVERAGE "Enable GCov coverage analysis (adds a 'coverage' target)" OFF) - -if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG") - if(GMGPOLAR_TEST_COVERAGE) - message(STATUS "Coverage enabled") - include(CodeCoverage) - append_coverage_compiler_flags() - setup_target_for_coverage_lcov( - NAME coverage - EXECUTABLE tests/gmgpolar_tests - EXCLUDE "${CMAKE_SOURCE_DIR}/tests*" "${CMAKE_SOURCE_DIR}/src/test_cases*" "${CMAKE_BINARY_DIR}/*" "/usr*" - ) - endif() -endif() - - -add_library(GMGPolar ${SOURCES_SRC}) - -add_executable(gmgpolar_simulation ./src/main.cpp) - -configure_file(${CMAKE_SOURCE_DIR}/include/config_internal.h.in ${CMAKE_SOURCE_DIR}/include/config_internal.h) - -target_include_directories(gmgpolar_simulation PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/test_cases ) -target_include_directories(GMGPolar PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/test_cases ) - -if(GMGPOLAR_USE_LIKWID) - - find_package(LIKWID REQUIRED) - - target_include_directories(GMGPolar PUBLIC ${LIKWID_INCLUDE_DIRS}) - target_link_libraries(GMGPolar PUBLIC ${LIKWID_LIBRARIES}) - target_compile_definitions(GMGPolar PUBLIC "-DLIKWID_PERFMON") - -endif() - - - -if(GMGPOLAR_USE_MUMPS) - set(INC_DIRS - /home/kueh_mj/.spack/rev.23.05/install/linux-rocky8-zen2/gcc-10.4.0/mumps-5.4.1-fftqkl/include - /sw/rev/23.05/linux-rocky8-zen2/gcc-10.4.0/metis-5.1.0-akhgsf/include - ) - - set(LIB_DIRS - /home/kueh_mj/.spack/rev.23.05/install/linux-rocky8-zen2/gcc-10.4.0/mumps-5.4.1-fftqkl/lib - /sw/rev/23.05/linux-rocky8-zen2/gcc-10.4.0/metis-5.1.0-akhgsf/lib - ) - - include_directories( - ${INC_DIRS} - ) - - target_link_directories( - GMGPolar - PUBLIC - ${LIB_DIRS} - ) - - set(LIBS - mpiseq - dmumps - mumps_common - metis - ) - - target_link_libraries( - GMGPolar - PUBLIC - ${LIBS} - ) -endif() - - -find_package(OpenMP) - -#currently works on GNU compiler -if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7)) - - string(APPEND CMAKE_CXX_FLAGS " -O2 -Wall -MMD -MP -Wwrite-strings") - string(APPEND CMAKE_LINKER_FLAGS " -O2 -Wall -MMD -MP -Wwrite-strings") - - if(OPENMP_FOUND) - string(APPEND CMAKE_CXX_FLAGS " -fopenmp") - string(APPEND CMAKE_LINKER_FLAGS " -fopenmp") - - else() - message(FATAL_ERROR "OpenMP needed") - endif() +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CUDA_STANDARD 17) +set(CMAKE_CUDA_STANDARD_REQUIRED ON) +set(CMAKE_CUDA_ARCHITECTURES 70) +enable_language(CUDA) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -pedantic -Wno-unused") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -mtune=generic") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -fopenmp -arch=sm_70 -Wno-deprecated-declarations") +set(CMAKE_CUDA_FLAGS_RELEASE "${CMAKE_CUDA_FLAGS_RELEASE} -O3") +set(CMAKE_CUDA_FLAGS_DEBUG "${CMAKE_CUDA_FLAGS_DEBUG} -g -O0") + +set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) +set(CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS ON) + +# Find CUDA and OpenMP packages +find_package(CUDA REQUIRED) +find_package(OpenMP REQUIRED) + +# OpenMP for host code (C++): +if(OpenMP_CXX_FOUND) + message(STATUS "OpenMP enabled for C++") + set(OpenMP_CXX_LIB OpenMP::OpenMP_CXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") else() - message(FATAL_ERROR "Please use GNU compiler or change CMakeLists manually") + message(WARNING "OpenMP not found for C++") endif() - -target_link_libraries(gmgpolar_simulation PRIVATE GMGPolar) - - -include(thirdparty/CMakeLists.txt) -add_subdirectory(tests) +# Mumps: Sparse Matrix Solver +set(MUMPS_PREFIX_PATH "~/spack/opt/spack/linux-debian11-ivybridge/gcc-10.2.1/mumps-5.6.2-hm3vnybofcspkmjb6xdhttmdt3uetvo4") +# set(MUMPS_PREFIX_PATH "~/spack/opt/spack/linux-almalinux9-x86_64/gcc-11.3.1/mumps-5.5.1-lrzoqcjlexwh3d5slabppc7epa2cnezu") +include_directories(${MUMPS_PREFIX_PATH}/include) +link_directories(${MUMPS_PREFIX_PATH}/lib) + +# Metis: Matrix reordering for Mumps +set(METIS_PREFIX_PATH "~/spack/opt/spack/linux-debian11-ivybridge/gcc-10.2.1/metis-5.1.0-wkmpso5x6ytk7u7t5z7a5h4r4xtm35lv") +# set(METIS_PREFIX_PATH "~/spack/opt/spack/linux-almalinux9-x86_64/gcc-11.3.1/metis-5.1.0-naocq5j6bxwrw5srcjse2q3aje2q736h") +include_directories(${METIS_PREFIX_PATH}/include) +link_directories(${METIS_PREFIX_PATH}/lib) + +set(MUMPS_LIBRARIES + mumps_common + smumps + dmumps + mpiseq + metis +) + +# 1. Create a library target for the PolarGrid module +file(GLOB_RECURSE POLAR_GRID_SOURCES "src/PolarGrid/*.cpp" "src/PolarGrid/*.cu") +add_library(PolarGrid STATIC ${POLAR_GRID_SOURCES}) +target_include_directories(PolarGrid PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/PolarGrid) + +# 2. Create a library target for the InputFunctions module +file(GLOB_RECURSE INPUT_FUNCTIONS_SOURCES "src/InputFunctions/*.cpp" "src/InputFunctions/*.cu") +add_library(InputFunctions STATIC ${INPUT_FUNCTIONS_SOURCES}) +target_include_directories(InputFunctions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/InputFunctions) + +file(GLOB_RECURSE GMG_POLAR_SOURCES "src/GMGPolar/*.cpp" "src/GMGPolar/*.cu" "src/GMGPolar/MultigridMethods/*.cpp" "src/GMGPolar/MultigridMethods/*.cu") +file(GLOB_RECURSE LEVEL_SOURCES "src/Level/*.cpp" "src/Level/*.cu") +file(GLOB_RECURSE INTERPOLATION_SOURCES "src/Interpolation/*.cpp" "src/Interpolation/*.cu") +file(GLOB_RECURSE DIRECT_SOLVER_SOURCES "src/DirectSolver/*.cpp") +file(GLOB_RECURSE STENCIL_SOURCES "src/Stencil/*.cpp") + +file(GLOB_RECURSE RESIDUAL_TAKE_CPU_SOURCES "src/Residual/ResidualTakeCPU/*.cpp") +file(GLOB_RECURSE RESIDUAL_TAKE_GPU_SOURCES "src/Residual/ResidualTakeGPU/*.cpp" "src/Residual/ResidualTakeGPU/*.cu") + +file(GLOB_RECURSE SMOOTHER_TAKE_CPU_SOURCES "src/Smoother/SmootherTakeCPU/*.cpp") +file(GLOB_RECURSE SMOOTHER_TAKE_GPU_SOURCES "src/Smoother/SmootherTakeGPU/*.cpp" "src/Smoother/SmootherTakeGPU/*.cu") + +file(GLOB_RECURSE EXTRAPOLATED_SMOOTHER_TAKE_CPU_SOURCES "src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/*.cpp") +file(GLOB_RECURSE EXTRAPOLATED_SMOOTHER_TAKE_GPU_SOURCES "src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/*.cpp" "src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/*.cu") + +# 4. Create the GMGPolarLib library and link PolarGrid and InputFunctions +add_library(GMGPolarLib STATIC + ${GMG_POLAR_SOURCES} + ${LEVEL_SOURCES} + ${INTERPOLATION_SOURCES} + + ${DIRECT_SOLVER_SOURCES} + ${STENCIL_SOURCES} + + ${RESIDUAL_TAKE_CPU_SOURCES} + ${RESIDUAL_TAKE_GPU_SOURCES} + + ${SMOOTHER_TAKE_CPU_SOURCES} + ${SMOOTHER_TAKE_GPU_SOURCES} + + ${EXTRAPOLATED_SMOOTHER_TAKE_CPU_SOURCES} + ${EXTRAPOLATED_SMOOTHER_TAKE_GPU_SOURCES} +) +# Link PolarGrid and InputFunctions to GMGPolarLib +target_link_libraries(GMGPolarLib PUBLIC PolarGrid InputFunctions ${MUMPS_LIBRARIES} ${OpenMP_CXX_LIB} cuda cudart cudadevrt cusparse cusolver) + +set(MAIN_SOURCE "src/main.cpp") +add_executable(gmgpolar ${MAIN_SOURCE}) + +target_link_libraries(gmgpolar PRIVATE GMGPolarLib) + +if(GMGPOLAR_BUILD_TESTS) + enable_testing() + add_subdirectory(third-party) + add_subdirectory(tests) +endif() diff --git a/README.md b/README.md index 8d057932..ff84ef80 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -GMGPolar -======= +GMGPolar using CUDA +=================== GMGPolar is a performant geometric multigrid solver using implicit extrapolation to raise the convergence order. It is based on meshes in tensor- or product-format. GMGPolar's focus applications are geometries that can be described by polar or curvilinear coordinates for which suited smoothing procedures have been developed. @@ -7,90 +7,103 @@ If using GMGPolar, please cite: M. J. Kühn, C. Kruse, U. Rüde. Implicitly extrapolated geometric multigrid on disk-like domains for the gyrokinetic Poisson equation from fusion plasma applications. Journal of Scientific Computing, 91 (28). Springer (2022). Link: https://link.springer.com/article/10.1007/s10915-022-01802-1 -Tested plateforms ------------------ +## Obtaining the source code -Working -======= +The GMGPolar Solver requires external libraries, specifically the sparse direct solver ``MUMPS``. This guide provides instructions to obtain the code and install the necessary dependencies. -* Linux x86_64 with GNU 9.3.0 compilers. +## Clone the GMGPolar Repository -Obtaining the source code -------------------------- +To begin, download the latest stable version of GMGPolar by running the following commands in your terminal: -The GmgPolar Solver does not require any external libraries. -It is possible to link the code with the sparse direct solver ``MUMPS``. + # Clone the repository. This will create a directory named GMGPolar. + git clone https://github.com/mknaranja/GMGPolar -* ``MUMPS`` is optional. However, it is absolutely recommended if large grids are considered. - Otherwise, the nonoptimal backup solver will be used for factorization of the matrices and will - slow down the setup phase significantly. To use it, compile the code with option -DGMGPOLAR_USE_MUMPS. - It is recommended to use the latest version (currently 5.4.1) but any version ulterior - to 5.1.0 should be okay. MUMPS is available freely on demand on the MUMPS consortium - website "mumps-solver.org". - -The installation can be done by typing the following commands in your terminal +## Configuring the Solver - # download the latest stable version - # it will create a directory named GMGPolar +After cloning the repository, you'll need to configure the solver for your system. Edit the ``CMakeLists.txt`` file to reflect your system's configuration (e.g., paths to libraries, file names, etc.). - git clone https://github.com/mknaranja/GMGPolar +## Installing MUMPS using Spack -Now that everything is ready, we can compile the solver. -Edit the file ``Makefile.in`` so that it reflects your configuration (path to libraries, file -names, etc). +We highly recommend using Spack to manage and install external dependencies such as MUMPS. The following steps outline the process for installing MUMPS and related tools. +## Step 1: Install Spack -Building the library --------------------- - -The build process is done using CMake: +To install and set up Spack, execute the following commands in your terminal: - # Create build directory - mkdir -p build && cd build - # Configure - cmake .. - # Build - cmake --build . + # Clone the Spack repository + git clone https://github.com/spack/spack.git -Currently, the default build process only supports gnu compiler although Intel compiler -has been successfully tested for some configurations. + # Add Spack to your environment by sourcing its setup script + echo ". $HOME/spack/share/spack/setup-env.sh" >> ~/.bashrc -Running GmgPolar ------------- + # Refresh your terminal or source your .bashrc + source ~/.bashrc -You can run the solver without having to write a code (as we do in the next section). After building -the library, a binary is created called ``./build/gmgpolar_simulation``, it takes parameters directly from command-line. +## Step 2: Install MUMPS - - # To try GmgPolar on a small problem size, without having to write any code, - # ./build/gmgpolar_simulation uses default parameters with a grid 49 x 64. +With Spack set up, you can now install MUMPS. The following command installs version 5.5.1 of MUMPS with specific options that are recommended for GMGPolar: - ./build/gmgpolar_simulation + spack install mumps@5.5.1 + blr_mt=false + complex=false + double=true + float=true + incfort=false + int64=false + metis=true + mpi=false + openmp=true + parmetis=false + ptscotch=false + scotch=false + shared=true - # For more details on the available parameters, see the main.cpp source code. - # You can control the number of OpenMP threads used by changing the environment variable. - # Note that only MUMPS is parallelized at the moment. +## Step 3: Install Required Dependencies - export OMP_NUM_THREADS=4 - +MUMPS relies on other packages like `Metis` for matrix ordering and `Likwid` for performance monitoring. You can install these dependencies using Spack as well: -Executing an example -------------------------------------------------- +1. **Install Metis (Fill-Reducing Matrix Ordering Library)**: + ```bash + spack install metis + ``` -Once the library is built, you can run the examples: +2. **Install Likwid (Performance Monitoring Tool)**: + ```bash + spack install likwid + ``` - # the verbose option defines the extent of the output +## Step 4: Configure CMake for GMGPolar - ./build/gmgpolar_simulation --verbose 2 +After installing MUMPS and other dependencies, ensure that the paths to the libraries are correctly set in the CMakeLists.txt file. - # the option --debug 1 turns on internal debugging and compares the results of the C++ code - # with the results from the previous matlab implementation. - - ./build/gmgpolar_simulation --debug 1 +## Final Step: Compiling the GMGPolar Solver + +Once everything is configured, compile the solver by running the following commands: + +```bash +cd scripts +./compile.sh [Debug|Release] +``` + +After executing ./compile.sh [Debug|Release], the script will compile the solver using the specified build type. You can also run ./compile.sh without any arguments afterward, and it will automatically use the last configured build type. + +Currently, the default build process only supports gnu compiler although Intel compiler +has been successfully tested for some configurations. +## Running GMGPolar + +You can run the solver without having to write a code (as we do in the next section). After building +the library, a binary is created called ``./build/gmgpolar``, it takes parameters directly from command-line. + + # To try GMGPolar on a small problem size, without having to write any code, + # ./build/gmgpolar uses default parameters with a grid 33 x 64. + + ./build/gmgpolar + + # For more details on the available parameters, see the scripts/run.sh script. + +## Issue tracker -Issue tracker -------------- If you find any bug, didn't understand a step in the documentation, or if you have a feature request, submit your issue on our `Issue Tracker`: https://github.com/mknaranja/GMGPolar/issues @@ -99,10 +112,9 @@ by giving: - reproducible parameters - computing environment (compiler, etc.) +## Release Notes -Release Notes -------------- -* GmgPolar 1.0 +* GMGPolar 1.0 1) Working multigrid cycle 2) In-house solver and possibility to link with MUMPS for the smoothing and coarse grid solution 3) Extrapolation strategies: @@ -113,3 +125,67 @@ Release Notes c. Non-default implicit extrapolation with smoothing of all nodes on the finest level [experimental, use with care, convergence cannot be observed with residual] (--extrapolation 2) 6) Optimization of apply_A / build_rhs / apply_prolongation / build_Asc / apply_Asc_ortho + +* GMGPolar 2.0 +More points + +## Release Notes + +### GMGPolar 1.0 + +- **Multigrid Cycle:** Fully functional multigrid cycle implementation. +- **Solver Options:** + - In-house solver available. + - Option to link with **MUMPS** for smoothing and coarse grid solutions. +- **Extrapolation Strategies:** + - **No Extrapolation:** Use with `--extrapolation 0`. + - **Default Implicit Extrapolation:** Use with `--extrapolation 1`. + - **Experimental Implicit Extrapolation:** + - Applies smoothing to all nodes on the finest level. + - Use with caution; convergence cannot be observed with residual. + - Use with `--extrapolation 2`. +- **Performance Optimization:** + - Optimized methods for: + - `apply_A` + - `build_rhs` + - `apply_prolongation` + - `build_Asc` + - `apply_Asc_ortho` + +### GMGPolar 2.0 + +#### Enhancements + +- **Refactored Class Layout:** + - **Linear Algebra Enhancements:** + - Introduced custom **Vector** and **SparseMatrix** classes. + - Added a (cyclic) **Tridiagonal Solver** for improved performance and usability. + - **Input Function Enhancements:** + - Separated into distinct components: **DomainGeometry**, **BoundaryConditions**, **SourceTerm**, etc. + - **Polar Grid:** + - Indexing is now based on circle/radial smoother. + - **Residual** + - Improved the residual calculation by addressing the unintuitive behavior that previously applied only to the interior part of the matrix. + - **Direct Solver:** + - Fixed a bug where boundary values were not treated correctly. + - Built matrices to be symmetric, reducing factorization time. + - **Smoother:** + - Separated into extrapolated and standard smoothers. + - Replaced the LU-Decomposition algorithm with the Thomas algorithm for improved efficiency. + +#### New Features + +- Introduced **W** and **F** cycles for enhanced solving capabilities. +- Added **FMG** (Full Multigrid) to obtain improved starting solutions. +- Implemented advanced caching behavior options for the "Give" implementation strategy. +- Added a faster strategy named 'Take,' which is appropriate for cases where memory is less of a constraint, resulting in an 80% increase in memory usage. +- **Comprehensive Unit Tests:** Integrated Google Unit Tests for all classes, ensuring robust and reliable functionality across the codebase. + +#### Performance Improvements + +- Removed the task-based approach, which did not scale well with increasing parallelization. +- Reduced maximum usage by 61.5% by constructing symmetric matrices and utilizing the tridiagonal structure of smoother matrices. + +#### Removed Features + +- Discontinued the in-house solver, now replaced by MUMPS for improved functionality. \ No newline at end of file diff --git a/TEST_CART/README b/TEST_CART/README deleted file mode 100644 index 09984cd4..00000000 --- a/TEST_CART/README +++ /dev/null @@ -1,18 +0,0 @@ -# To run with uniform points - -python3 make_points_r.py --R0 1e-5 --R 1 32 r.txt -python3 make_t.py 32 t.txt -sh tmp.sh -python3 plot.py - -# To run with non-uniform points - -python3 make_points_r.py --R0 1e-5 --R 1 32 r.txt -python3 make_t.py 32 t.txt --non_uniform -sh tmp.sh -python3 plot.py - - -# Speedup - -If code is slow use pyccel to accelerate rho_triangularity_logical.py diff --git a/TEST_CART/make_points_r.py b/TEST_CART/make_points_r.py deleted file mode 100644 index 2abbd93a..00000000 --- a/TEST_CART/make_points_r.py +++ /dev/null @@ -1,21 +0,0 @@ -from argparse import ArgumentParser -import numpy as np - -parser = ArgumentParser(description='Tool for generating points') -parser.add_argument('Nc', type=int, help='Number of cells (must be a multiple of 2)') -parser.add_argument('outfile', type=str, help='File where points should be printed') -parser.add_argument('--R0', type=float, default=1e-5, help='Minimum radius') -parser.add_argument('--R', type=float, default=1.0, help='Maximum radius') -args = parser.parse_args() - - -R0 = args.R0 -R = args.R -outfile = args.outfile -N = args.Nc - -pts = np.linspace(R0, R, N+1) - -with open(outfile,'w') as f: - for p in pts: - print(p, file=f) diff --git a/TEST_CART/make_t.py b/TEST_CART/make_t.py deleted file mode 100644 index 5ce2f6f5..00000000 --- a/TEST_CART/make_t.py +++ /dev/null @@ -1,30 +0,0 @@ -from argparse import ArgumentParser -import numpy as np -import sys - -parser = ArgumentParser(description='Tool for generating points') -parser.add_argument('Nc', type=int, help='Number of cells (must be a multiple of 2)') -parser.add_argument('outfile', type=str, help='File where points should be printed') -parser.add_argument('--non_uniform', action = 'store_true', help='Cutoff = pi/4') -args = parser.parse_args() - -N = args.Nc -has_cutoff = args.non_uniform - -if has_cutoff: - cutoff = np.pi/4 -else: - cutoff = 0 - -percent_in = cutoff/np.pi - -n_in = round(2*percent_in*N) -n_out = round((1-percent_in)*N) - -q = [*np.linspace(0, cutoff, n_in//2, endpoint=False), - *np.linspace(cutoff, 2*np.pi-cutoff, n_out, endpoint=False), - *np.linspace(2*np.pi-cutoff, 2*np.pi, n_in//2, endpoint=False)] - -with open('t.txt','w') as f: - for p in q: - print(p, file=f) diff --git a/TEST_CART/plot.py b/TEST_CART/plot.py deleted file mode 100644 index 9c0d5f38..00000000 --- a/TEST_CART/plot.py +++ /dev/null @@ -1,53 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import rho_triangularity_logical as mod -import article_setup - -r, q, x, y, f = np.loadtxt('sol_out.txt', unpack=True) -nq = 1 -while r[nq]==r[nq-1]: - nq += 1 -nr = len(q)//nq -r = r.reshape((nr,nq)) -q = q.reshape((nr,nq)) -x = x.reshape((nr,nq)) -y = y.reshape((nr,nq)) -f = f.reshape((nr,nq)) - -x = np.concatenate([x, x[:, :1]], axis=1) -y = np.concatenate([y, y[:, :1]], axis=1) -r = np.concatenate([r, r[:, :1]], axis=1) -q = np.concatenate([q, q[:, :1]], axis=1) -f = np.concatenate([f, f[:, :1]], axis=1) - -exact_func = np.vectorize(mod.phi_exact) -exact = exact_func(r, q, 0.3, 1.4) - -err = f - exact - -def plot_fig(val, title): - fig, ax = plt.subplots(1,1) - - crop_val = max(-val.min(), val.max()) - clevels = np.linspace(-crop_val, crop_val, 101) - im = ax.contourf( x[:,:], y[:,:], val[:,:], clevels, cmap='seismic' ) - for c in im.collections: - c.set_edgecolor('face') - ax.set_xlabel('x') - ax.set_ylabel('y', rotation=0) - cbar = plt.colorbar( im ) - cbar.formatter.set_powerlimits((0,0)) - n1 = 8 - nr = 8 - ax.plot( x[:,::nr], y[:,::nr], '-', color='lightgrey', lw=0.5 ) - ax.plot( x.transpose()[:,::nr], y.transpose()[:,::nr], '-', color='lightgrey', lw=0.5 ) - ax.set_title(title) - plt.tight_layout() - -plot_fig(err, title='Error') -plt.savefig('gmgpolar_czarny_cart_error.png') - -#plot_fig(f, title = 'Calculated solution') -#plot_fig(exact, title = 'Exact solution') - -plt.show() diff --git a/TEST_CART/r.txt b/TEST_CART/r.txt deleted file mode 100644 index 77e67f55..00000000 --- a/TEST_CART/r.txt +++ /dev/null @@ -1,33 +0,0 @@ -1e-05 -0.0312596875 -0.062509375 -0.0937590625 -0.12500875 -0.1562584375 -0.18750812500000003 -0.2187578125 -0.2500075 -0.2812571875 -0.312506875 -0.34375656250000003 -0.37500625000000004 -0.40625593750000005 -0.437505625 -0.4687553125 -0.500005 -0.5312546874999999 -0.562504375 -0.5937540625 -0.62500375 -0.6562534375 -0.687503125 -0.7187528125 -0.7500025 -0.7812521875 -0.812501875 -0.8437515624999999 -0.87500125 -0.9062509375 -0.937500625 -0.9687503125 -1.0 diff --git a/TEST_CART/rho_triangularity_logical.py b/TEST_CART/rho_triangularity_logical.py deleted file mode 100644 index 10f4c0a3..00000000 --- a/TEST_CART/rho_triangularity_logical.py +++ /dev/null @@ -1,78 +0,0 @@ -import numpy - -from pyccel.decorators import pure - - -@pure -def x(s : float, theta : float, map2_epsilon : float, map2_e : float): - return (1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon - - -@pure -def y(s : float, theta : float, map2_epsilon : float, map2_e : float): - return map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - - -@pure -def J_ss(s : float, theta : float, map2_epsilon : float, map2_e : float): - return -numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - - -@pure -def J_st(s : float, theta : float, map2_epsilon : float, map2_e : float): - return s*numpy.sin(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - - -@pure -def J_ts(s : float, theta : float, map2_epsilon : float, map2_e : float): - return map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - - -@pure -def J_tt(s : float, theta : float, map2_epsilon : float, map2_e : float): - return s*(-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - - -@pure -def J_xs(s : float, theta : float, map2_epsilon : float, map2_e : float): - return (map2_epsilon**6*(numpy.sin(theta))**2 - map2_epsilon**6 + 5.0*map2_epsilon**5*s*(numpy.sin(theta))**2*numpy.cos(theta) - 6.0*map2_epsilon**5*s*numpy.cos(theta) + 8.0*map2_epsilon**4*s**2*(numpy.sin(theta))**2*(numpy.cos(theta))**2 - 12.0*map2_epsilon**4*s**2*(numpy.cos(theta))**2 - 8.0*map2_epsilon**4*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2 + 8.0*map2_epsilon**4*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0) + 27.0*map2_epsilon**4*(numpy.sin(theta))**2 - 27.0*map2_epsilon**4 + 4.0*map2_epsilon**3*s**3*(numpy.sin(theta))**2*(numpy.cos(theta))**3 - 8.0*map2_epsilon**3*s**3*(numpy.cos(theta))**3 - 26.0*map2_epsilon**3*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2*numpy.cos(theta) + 32.0*map2_epsilon**3*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) + 94.0*map2_epsilon**3*s*(numpy.sin(theta))**2*numpy.cos(theta) - 108.0*map2_epsilon**3*s*numpy.cos(theta) - 20.0*map2_epsilon**2*s**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2*(numpy.cos(theta))**2 + 32.0*map2_epsilon**2*s**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.cos(theta))**2 + 80.0*map2_epsilon**2*s**2*(numpy.sin(theta))**2*(numpy.cos(theta))**2 - 108.0*map2_epsilon**2*s**2*(numpy.cos(theta))**2 - 48.0*map2_epsilon**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2 + 48.0*map2_epsilon**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0) + 67.0*map2_epsilon**2*(numpy.sin(theta))**2 - 67.0*map2_epsilon**2 - 82.0*map2_epsilon*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2*numpy.cos(theta) + 96.0*map2_epsilon*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) + 121.0*map2_epsilon*s*(numpy.sin(theta))**2*numpy.cos(theta) - 134.0*map2_epsilon*s*numpy.cos(theta) - 40.0*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.sin(theta))**2 + 40.0*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0) + 41.0*(numpy.sin(theta))**2 - 41.0)/(map2_epsilon**4*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) - 8.0*map2_epsilon**4*numpy.cos(theta) + 4.0*map2_epsilon**3*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.cos(theta))**2 - 32.0*map2_epsilon**3*s*(numpy.cos(theta))**2 + 4.0*map2_epsilon**2*s**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.cos(theta))**3 - 32.0*map2_epsilon**2*s**2*(numpy.cos(theta))**3 + 26.0*map2_epsilon**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) - 48.0*map2_epsilon**2*numpy.cos(theta) + 52.0*map2_epsilon*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*(numpy.cos(theta))**2 - 96.0*map2_epsilon*s*(numpy.cos(theta))**2 + 41.0*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) - 40.0*numpy.cos(theta)) - - -@pure -def J_xt(s : float, theta : float, map2_epsilon : float, map2_e : float): - return (1/2)*(-map2_epsilon**2*numpy.sqrt(4.0 - map2_epsilon**2)*numpy.sin(theta) - 2.0*map2_epsilon*s*numpy.sqrt(4.0 - map2_epsilon**2)*numpy.sin(theta)*numpy.cos(theta) + 2.0*numpy.sqrt(4.0 - map2_epsilon**2)*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta) - numpy.sqrt(4.0 - map2_epsilon**2)*numpy.sin(theta))/(map2_e*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)) - - -@pure -def J_ys(s : float, theta : float, map2_epsilon : float, map2_e : float): - return (map2_epsilon**4*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta) - 6.0*map2_epsilon**4*numpy.sin(theta) + 3.0*map2_epsilon**3*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta)*numpy.cos(theta) - 20.0*map2_epsilon**3*s*numpy.sin(theta)*numpy.cos(theta) + 2.0*map2_epsilon**2*s**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta)*(numpy.cos(theta))**2 - 16.0*map2_epsilon**2*s**2*numpy.sin(theta)*(numpy.cos(theta))**2 + 14.0*map2_epsilon**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta) - 20.0*map2_epsilon**2*numpy.sin(theta) + 23.0*map2_epsilon*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta)*numpy.cos(theta) - 36.0*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta) + 13.0*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.sin(theta) - 14.0*numpy.sin(theta))/(map2_epsilon**4*s + 4.0*map2_epsilon**3*s**2*numpy.cos(theta) + 4.0*map2_epsilon**2*s**3*(numpy.cos(theta))**2 - 6.0*map2_epsilon**2*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0) + 14.0*map2_epsilon**2*s - 12.0*map2_epsilon*s**2*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) + 28.0*map2_epsilon*s**2*numpy.cos(theta) - 14.0*s*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0) + 13.0*s) - - -@pure -def J_yt(s : float, theta : float, map2_epsilon : float, map2_e : float): - return (1/2)*(-numpy.sqrt(4.0 - map2_epsilon**2)*numpy.sqrt(map2_epsilon**2 + 2.0*map2_epsilon*s*numpy.cos(theta) + 1.0)*numpy.cos(theta) + 2.0*numpy.sqrt(4.0 - map2_epsilon**2)*numpy.cos(theta))/(map2_e*s) - - -@pure -def rho_glob(s : float, theta : float, map2_epsilon : float, map2_e : float): - return 0.4096*(1.0 - s)**6*(s + 1.0)**6*numpy.exp(numpy.tanh(20.0*s - 14.0))*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - (-s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(20.0*(numpy.tanh(20.0*s - 14.0))**2 - 20.0)*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((1/2)*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(4.0*map2_epsilon*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + 2.0*(-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + 2.0*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 1/2*(-2.0*map2_epsilon*(numpy.cos(theta))**3/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-2.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 4.0*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*(-2.0*map2_epsilon*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))**(3/2) - s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.8192*numpy.pi*map2_epsilon*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2) - 0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) + 0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*numpy.pi*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*numpy.pi*map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 1.6384*(numpy.pi)**2*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(theta)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 4.9152*numpy.pi*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 4.9152*numpy.pi*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + s*(-2.0*map2_epsilon*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - s*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(20.0*(numpy.tanh(20.0*s - 14.0))**2 - 20.0)*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(-0.8192*numpy.pi*map2_epsilon*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2) - 0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) + 0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*numpy.pi*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 4.0*numpy.pi*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 1.6384*(numpy.pi)**2*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(numpy.cos(theta))**2*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 1.6384*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(theta)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 4.9152*(1.0 - s)**6*(s + 1.0)**5*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 9.8304*numpy.pi*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 12.288*(1.0 - s)**6*(s + 1.0)**4*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 4.9152*(1.0 - s)**5*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 9.8304*numpy.pi*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 29.4912*(1.0 - s)**5*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) + 12.288*(1.0 - s)**4*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + s*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((1/2)*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(4.0*map2_epsilon*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + 2.0*(-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + 2.0*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 1/2*(-2.0*map2_epsilon*(numpy.cos(theta))**3/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-2.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*map2_e*map2_epsilon**2*s*numpy.sin(theta)*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 4.0*map2_e*map2_epsilon*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*(-2.0*map2_epsilon*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))**(3/2) - ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.8192*numpy.pi*map2_epsilon*s*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2) - 0.4096*s*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) + 1.6384*(numpy.pi)**2*s*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 0.8192*numpy.pi*s*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(theta)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 0.8192*numpy.pi*s*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*s*(1.0 - s)**6*(s + 1.0)**5*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 4.9152*numpy.pi*s*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 2.4576*s*(1.0 - s)**5*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 4.9152*numpy.pi*s*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*numpy.pi*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 4.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((1/2)*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(-4.0*map2_epsilon*s*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + 2.0*(-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 3.0*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*(numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 2.0*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*s*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 4.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 2.0*numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*s*(numpy.sin(theta))**3/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 6.0*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))**(3/2) + (0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*s*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 4.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 2.0*numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + (0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((1/2)*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(-4.0*map2_epsilon*s*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + 2.0*(-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 3.0*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*(numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 2.0*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*s*numpy.sin(theta)*(numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 4.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 4.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 2.0*numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 1/2*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(2.0*map2_epsilon*s*(numpy.sin(theta))**3/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 6.0*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 2.0*numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))**(3/2) + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) + ((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*(-0.8192*numpy.pi*map2_epsilon*s*(1.0 - s)**6*(s + 1.0)**6*(numpy.sin(theta))**2*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2) - 0.4096*s*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 1.6384*(numpy.pi)**2*s*(1.0 - s)**6*(s + 1.0)**6*(numpy.sin(theta))**2*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - 1.6384*numpy.pi*s*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.sin(theta)*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 0.4096*(1.0 - s)**6*(s + 1.0)**6*(-2.0*numpy.pi*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 4.0*numpy.pi*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 6.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))) - (0.4096*(1.0 - s)**6*(s + 1.0)**6*(2.0*numpy.pi*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + 2.0*numpy.pi*map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.cos(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + 0.8192*numpy.pi*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon)*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(theta)/numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) + 2.4576*(1.0 - s)**6*(s + 1.0)**5*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) - 2.4576*(1.0 - s)**5*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon))*(-2.0*map2_epsilon*s*(numpy.sin(theta))**2*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**2 + (-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) - 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**2*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 2.0*map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*map2_epsilon*s*(numpy.cos(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + (map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(-map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)**(3/2)) + 2.0*map2_e*map2_epsilon**2*s**2*(numpy.sin(theta))**3/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**3*(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - 3.0*map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) - map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0) - (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*numpy.exp(-numpy.tanh(20.0*s - 14.0))/numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))/(s*numpy.sqrt(-((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*(map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - numpy.sin(theta)*numpy.cos(theta)/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2 + ((-map2_e*map2_epsilon*s*(numpy.sin(theta))**2/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.sin(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))*((map2_e*map2_epsilon*s*numpy.sin(theta)*numpy.cos(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))**2*numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)) + map2_e*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))**2 + (numpy.cos(theta))**2/(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0)))) - - -@pure -def rho_pole(s : float, theta : float, map2_epsilon : float, map2_e : float): - return 0.0 - - -@pure -def coeffs1(s : float, theta : float, map2_epsilon : float, map2_e : float): - return numpy.exp(-numpy.tanh(20.0*s - 14.0)) - - -@pure -def coeffs2(s : float, theta : float, map2_epsilon : float, map2_e : float): - return 1.0*numpy.exp(numpy.tanh(20.0*s - 14.0)) - - -@pure -def phi_exact(s : float, theta : float, map2_epsilon : float, map2_e : float): - return 0.4096*(1.0 - s)**6*(s + 1.0)**6*numpy.sin(2.0*numpy.pi*map2_e*s*numpy.sin(theta)/(numpy.sqrt(1.0 - 1/4*map2_epsilon**2)*(2.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))))*numpy.cos(2.0*numpy.pi*(1.0 - numpy.sqrt(map2_epsilon*(map2_epsilon + 2.0*s*numpy.cos(theta)) + 1.0))/map2_epsilon) diff --git a/TEST_CART/tmp.sh b/TEST_CART/tmp.sh deleted file mode 100644 index a13c527d..00000000 --- a/TEST_CART/tmp.sh +++ /dev/null @@ -1 +0,0 @@ -../build_gnu/main -n 4 -a 1 --mod_pk 2 --DirBC_Interior 0 --divideBy2 1 -r 1e-5 --smoother 3 --verbose 2 --debug 0 --extrapolation 1 --optimized 1 --openmp 2 --v1 1 --v2 1 -R 1.0 --prob 7 --maxiter 300 --alpha_coeff 2 --beta_coeff 1 --res_norm 3 --f_grid_r "r.txt" --f_grid_theta "t.txt" --rel_red_conv 1e-11 --f_sol_out sol_out.txt diff --git a/batch.sh b/batch.sh deleted file mode 100644 index a9231297..00000000 --- a/batch.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -#fixed variables -debug=0 # D -v1=1 # v1 -v2=1 # v2 -cycle=1 # c -compute_rho=0 # compute_rho -level=-1 # l -plotit=0 # P -solveit=1 # S -maxiter=150 # maxiter -periodic=1 # periodic -origin_NOT_coarse=0 # origin_NOT_coarse -theta_aniso=0 # theta_aniso -paraview=0 # paraview -prob=5 # prob -R=1.3 # R -kappa_eps=0 # k -delta_e=0 # d -discr=3 # discr -fac_ani=3 # a -nr_exp=4 # n -ntheta_exp=4 # ntheta_exp - - -#changing variables -mod_pk=0 # mod_pk (0/1) -R0=0.1 # r (1e-8/1e-5/1e-2) -DirBC_Interior=0 # DirBC_Interior (0/1) -divideBy2=0 # divideBy2 (3/4/5/6) -smoother=3 # smoother (3,13) -extrapolation=0 # E - - - -#overwrite existing file with an empty file -break > output.txt - - - -for extrapol in 0 1 -do - - for smoother in 3 13 #iterate over old/new version of smoothing - do - - for R0 in 1e-5 1e-2 1e-1 #iterate over inner radius - do - - for mod_pk in 0 1 #iterate over geometry - do - - for DirBC_Interior in 1 0 #iterate over treatment of origin (across-the-origin/ Diriclet BC) - do - - for divideBy2 in 0 1 2 3 #iterate over the different grid sizes - do - - #call the multigrid algorithm, and append the output to a file - ./build/main -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 $divideBy2 -r $R0 --smoother $smoother -E $extrapol >> output.txt - - done - done - done - done - done -done - diff --git a/batch.sh_paper b/batch.sh_paper deleted file mode 100644 index 76db471a..00000000 --- a/batch.sh_paper +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -#SBATCH --job-name=gmgpolar # create a short name for your job -#SBATCH --output=slurm-%A.out # stdout file %A=job id -#SBATCH --error=slurm-%A.err # stderr file -#SBATCH -N 1 -#SBATCH -n 1 -#SBATCH -c 4 -#SBATCH -t 6000 -#SBATCH --exclusive - -## -## This is the run configuration to reproduce GMGPolar results of Figure 8 a) - d) in -## Bourne et al. - Solver comparison for Poisson-like equations on tokamak geometries (2023) -## -#fixed variables (some of these variables have no effect, variables have to be cleaned up for a better presentation) -debug=0 -v1=1 -v2=1 -maxiter=300 -nr_exp=4 -res_norm=3 -R0=1e-6 -DirBC_Interior=0 -smoother=3 -rel_red_conv=1e-11 - -# Problem -# prob=7 # setting not regarded: modified later on in loop -alpha_coeff=2 # Zoni shifted -beta_coeff=1 - -# geometry/grid -R=1.0 -fac_ani=0 -# mod_pk=0 # setting not regarded: modified later on in loop -kappa_eps=0.3 -delta_e=0.2 -# divideBy2=0 # setting not regarded: modified later on in loop - -# MG -openmp=4 -# extrapolation=1 # setting not regarded: modified later on in loop - -build_dir=build - -#overwrite existing file with an empty file -break > output.txt - -########## -## create grids -######### -mod_pk=0 # mod_pk has no effect on the creation of grids as the set of (r,theta) is - # the same for all geometries, only the mapping F(r,theta) -> (x,y) changes. - -mkdir -p angles_files/Rmax"$R"/aniso"$fac_ani"/ -mkdir -p radii_files/Rmax"$R"/aniso"$fac_ani"/ - -echo $prob $alpha_coeff $beta_coeff $fac_ani $extrapolation $mod_pk -for divideBy2 in 0 1 2 3 4 5 6 # create different grid sizes -do - ## ATTENTION / REMARK: - ## Please note that these calls will abort/segfault as creation of grids and computation in one step - ## is not yet supported by GMGPolar. We will make this functionality available in a future commit. - ## Please ignore abort/segfault for the calls in this loop. - ./${build_dir}/gmgpolar_simulation -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 $divideBy2 -r $R0 --smoother $smoother --verbose 2 --debug $debug --extrapolation $extrapolation --optimized 1 --openmp $openmp --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --write_radii_angles 1 --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" -done - - -################################################# -## TABLE 1-2: TEST CASES -################################################# -# module load mumps/mumps-5.4.1/mumps-5.4.1-gcc-11.3.0-openmpi-s7bj6hi -mkdir -p outputs - -echo "prob alpha_coeff beta_coeff fac_ani extrapolation mod_pk" -# 1) Triangular/Czarny 2) Shafranov -for mod_pk in 2 1 # 2=Triangular/Czarny, 1=Shafranov -do - # Cartesian + beta 0 + ani 0 - prob=7 # Solution (23) of Bourne et al. - echo $prob $alpha_coeff $beta_coeff $fac_ani $extrapolation $mod_pk - for extrapolation in 1 - do - for divideBy2 in 0 1 2 3 4 5 6 #iterate over the different grid sizes - do - # note that the divideBy2 option here is only used as a dummy for looping. Grids need to be stored beforehand and are loaded here. - echo "./${build_dir}/gmgpolar_simulation -n "$nr_exp" -a "$fac_ani" --mod_pk "$mod_pk" --DirBC_Interior "$DirBC_Interior" --divideBy2 0 -r "$R0" --smoother "$smoother" --verbose 2 --debug "$debug" --extrapolation "$extrapolation" --optimized 1 --openmp "$openmp" --v1 "$v1" --v2 "$v2" -R "$R" --prob "$prob" --maxiter "$maxiter" --alpha_coeff "$alpha_coeff" --beta_coeff "$beta_coeff" --res_norm "$res_norm" --f_grid_r radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt --f_grid_theta angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt --rel_red_conv "$rel_red_conv" 1> outputs/job.out_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt 2> outputs/job.err_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" - ./${build_dir}/gmgpolar_simulation -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 0 -r $R0 --smoother $smoother --verbose 2 --debug $debug --extrapolation $extrapolation --optimized 1 --openmp $openmp --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --rel_red_conv $rel_red_conv 1> "outputs/job.out_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" 2> "outputs/job.err_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" - done - done - - # Polar + beta 0-1 + ani 0-1 - prob=6 # Solution (22) of Bourne et al. - echo $prob $alpha_coeff $beta_coeff $fac_ani $extrapolation $mod_pk - for extrapolation in 1 - do - for divideBy2 in 0 1 2 3 4 5 6 #iterate over the different grid sizes - do - # note that the divideBy2 option here is only used as a dummy for looping. Grids need to be stored beforehand and are loaded here. - echo "./${build_dir}/gmgpolar_simulation -n "$nr_exp" -a "$fac_ani" --mod_pk "$mod_pk" --DirBC_Interior "$DirBC_Interior" --divideBy2 0 -r "$R0" --smoother "$smoother" --verbose 2 --debug "$debug" --extrapolation "$extrapolation" --optimized 1 --openmp "$openmp" --v1 "$v1" --v2 "$v2" -R "$R" --prob "$prob" --maxiter "$maxiter" --alpha_coeff "$alpha_coeff" --beta_coeff "$beta_coeff" --res_norm "$res_norm" --f_grid_r radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt --f_grid_theta angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt --rel_red_conv "$rel_red_conv" 1> outputs/job.out_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt 2> outputs/job.err_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" - ./${build_dir}/gmgpolar_simulation -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 0 -r $R0 --smoother $smoother --verbose 2 --debug $debug --extrapolation $extrapolation --optimized 1 --openmp $openmp --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --rel_red_conv $rel_red_conv 1> "outputs/job.out_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" 2> "outputs/job.err_"$fac_ani"_"$mod_pk"_"$prob"_"$beta_coeff"_"$extrapolation"_"$divideBy2"_"$rel_red_conv".txt" - done - done -done diff --git a/batch_omp.sh b/batch_omp.sh deleted file mode 100644 index 06f4f917..00000000 --- a/batch_omp.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -#fixed variables -debug=0 # D -v1=1 # v1 -v2=1 # v2 -cycle=1 # c -compute_rho=0 # compute_rho -level=-1 # l -plotit=0 # P -solveit=1 # S -maxiter=150 # maxiter -periodic=1 # periodic -origin_NOT_coarse=0 # origin_NOT_coarse -theta_aniso=0 # theta_aniso -paraview=0 # paraview -prob=5 # prob -R=1.3 # R -kappa_eps=0 # k -delta_e=0 # d -discr=3 # discr -fac_ani=3 # a -nr_exp=4 # n -ntheta_exp=4 # ntheta_exp - - -#changing variables -mod_pk=0 # mod_pk (0/1) -R0=1e-5 # r (1e-8/1e-5/1e-2) -DirBC_Interior=0 # DirBC_Interior (0/1) -divideBy2=0 # divideBy2 (3/4/5/6) -smoother=3 # smoother (3,13) -extrapol=0 # E - -verb=0 - - - -#overwrite existing file with an empty file -break > output_omp.txt - - - - -for mod_pk in 1 #iterate over geometry -do - - for DirBC_Interior in 1 #iterate over treatment of origin (across-the-origin/ Diriclet BC) - do - - for divideBy2 in 3 #iterate over the different grid sizes - do - - for omp in 1 2 4 - do - - for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #just do it several times to get an average value - do - - #call the multigrid algorithm, and append the output to a file - ./build/main -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 $divideBy2 -r $R0 --smoother $smoother -E $extrapol --openmp $omp --verbose $verb >> output_omp.txt - - done - done - done - done -done - diff --git a/batch_write_radii_angles.sh b/batch_write_radii_angles.sh deleted file mode 100644 index e057f0c5..00000000 --- a/batch_write_radii_angles.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -#fixed variables -debug=0 -v1=1 -v2=1 -cycle=1 -compute_rho=0 -level=-1 -plotit=0 -solveit=1 -maxiter=300 -periodic=1 -origin_NOT_coarse=0 -theta_aniso=0 -paraview=0 -discr=1 -nr_exp=4 -ntheta_exp=4 -res_norm=3 -R0=1e-5 -DirBC_Interior=1 -smoother=3 -rel_red_conv=1e-11 -write_radii_angles=1 - -# Problem -prob=7 -alpha_coeff=2 # Zoni shifted -beta_coeff=1 - -# geometry/grid -R=1.0 -fac_ani=1 -mod_pk=0 -kappa_eps=0.3 -delta_e=0.2 -divideBy2=0 - -# MG -openmp=4 -extrapolation=1 - -#f_grid_r="radii_files/aniso3/divide0.txt" -#f_grid_theta="angles_files/aniso3/divide0.txt" -f_grid_r="" -f_grid_theta="" - -build_dir=build_gnu - -#overwrite existing file with an empty file -break > output.txt - -################################################# -## TABLE 1-2: TEST CASES -################################################# -mkdir -p outputs - -for R in 1.0 1.3 -do - for fac_ani in 0 1 3 - do - for divideBy2 in 0 1 2 3 4 5 6 7 8 - do - ./build/main -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 $divideBy2 -r $R0 --smoother $smoother --verbose 0 --debug $debug --extrapolation $extrapolation --maxiter 150 --optimized 1 --openmp $openmp --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --write_radii_angles $write_radii_angles --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" - done - done -done diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake deleted file mode 100644 index 7696b879..00000000 --- a/cmake/CodeCoverage.cmake +++ /dev/null @@ -1,440 +0,0 @@ -# Copyright (c) 2012 - 2017, Lars Bilke -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# CHANGES: -# -# 2012-01-31, Lars Bilke -# - Enable Code Coverage -# -# 2013-09-17, Joakim Söderberg -# - Added support for Clang. -# - Some additional usage instructions. -# -# 2016-02-03, Lars Bilke -# - Refactored functions to use named parameters -# -# 2017-06-02, Lars Bilke -# - Merged with modified version from github.com/ufz/ogs -# -# 2019-05-06, Anatolii Kurotych -# - Remove unnecessary --coverage flag -# -# 2019-12-13, FeRD (Frank Dana) -# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor -# of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments. -# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY -# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list -# - Set lcov basedir with -b argument -# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be -# overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().) -# - Delete output dir, .info file on 'make clean' -# - Remove Python detection, since version mismatches will break gcovr -# - Minor cleanup (lowercase function names, update examples...) -# -# 2019-12-19, FeRD (Frank Dana) -# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets -# -# 2020-01-19, Bob Apthorpe -# - Added gfortran support -# -# 2020-02-17, FeRD (Frank Dana) -# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters -# in EXCLUDEs, and remove manual escaping from gcovr targets -# -# USAGE: -# -# 1. Copy this file into your cmake modules path. -# -# 2. Add the following line to your CMakeLists.txt (best inside an if-condition -# using a CMake option() to enable it just optionally): -# include(CodeCoverage) -# -# 3. Append necessary compiler flags: -# append_coverage_compiler_flags() -# -# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og -# -# 4. If you need to exclude additional directories from the report, specify them -# using full paths in the COVERAGE_EXCLUDES variable before calling -# setup_target_for_coverage_*(). -# Example: -# set(COVERAGE_EXCLUDES -# '${PROJECT_SOURCE_DIR}/src/dir1/*' -# '/path/to/my/src/dir2/*') -# Or, use the EXCLUDE argument to setup_target_for_coverage_*(). -# Example: -# setup_target_for_coverage_lcov( -# NAME coverage -# EXECUTABLE testrunner -# EXCLUDE "${PROJECT_SOURCE_DIR}/src/dir1/*" "/path/to/my/src/dir2/*") -# -# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set -# relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR) -# Example: -# set(COVERAGE_EXCLUDES "dir1/*") -# setup_target_for_coverage_gcovr_html( -# NAME coverage -# EXECUTABLE testrunner -# BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src" -# EXCLUDE "dir2/*") -# -# 5. Use the functions described below to create a custom make target which -# runs your test executable and produces a code coverage report. -# -# 6. Build a Debug build: -# cmake -DCMAKE_BUILD_TYPE=Debug .. -# make -# make my_coverage_target -# - -include(CMakeParseArguments) - -# Check prereqs -find_program( GCOV_PATH gcov ) -find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl) -find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat ) -find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test) -find_program( CPPFILT_PATH NAMES c++filt ) - -if(NOT GCOV_PATH) - message(FATAL_ERROR "gcov not found! Aborting...") -endif() # NOT GCOV_PATH - -if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang") - if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3) - message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...") - endif() -elseif(NOT CMAKE_COMPILER_IS_GNUCXX) - if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "[Ff]lang") - # Do nothing; exit conditional without error if true - elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") - # Do nothing; exit conditional without error if true - else() - message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") - endif() -endif() - -set(COVERAGE_COMPILER_FLAGS "-g -fprofile-arcs -ftest-coverage" - CACHE INTERNAL "") - -set(CMAKE_Fortran_FLAGS_COVERAGE - ${COVERAGE_COMPILER_FLAGS} - CACHE STRING "Flags used by the Fortran compiler during coverage builds." - FORCE ) -set(CMAKE_CXX_FLAGS_COVERAGE - ${COVERAGE_COMPILER_FLAGS} - CACHE STRING "Flags used by the C++ compiler during coverage builds." - FORCE ) -set(CMAKE_C_FLAGS_COVERAGE - ${COVERAGE_COMPILER_FLAGS} - CACHE STRING "Flags used by the C compiler during coverage builds." - FORCE ) -set(CMAKE_EXE_LINKER_FLAGS_COVERAGE - "" - CACHE STRING "Flags used for linking binaries during coverage builds." - FORCE ) -set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE - "" - CACHE STRING "Flags used by the shared libraries linker during coverage builds." - FORCE ) -mark_as_advanced( - CMAKE_Fortran_FLAGS_COVERAGE - CMAKE_CXX_FLAGS_COVERAGE - CMAKE_C_FLAGS_COVERAGE - CMAKE_EXE_LINKER_FLAGS_COVERAGE - CMAKE_SHARED_LINKER_FLAGS_COVERAGE ) - -if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading") -endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" - -if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") - link_libraries(gcov) -endif() - -# Defines a target for running and collection code coverage information -# Builds dependencies, runs the given executable and outputs reports. -# NOTE! The executable should always have a ZERO as exit code otherwise -# the coverage generation will not complete. -# -# setup_target_for_coverage_lcov( -# NAME testrunner_coverage # New target name -# EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR -# DEPENDENCIES testrunner # Dependencies to build first -# BASE_DIRECTORY "../" # Base directory for report -# # (defaults to PROJECT_SOURCE_DIR) -# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative -# # to BASE_DIRECTORY, with CMake 3.4+) -# NO_DEMANGLE # Don't demangle C++ symbols -# # even if c++filt is found -# ) -function(setup_target_for_coverage_lcov) - - set(options NO_DEMANGLE) - set(oneValueArgs BASE_DIRECTORY NAME) - set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS) - cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(NOT LCOV_PATH) - message(FATAL_ERROR "lcov not found! Aborting...") - endif() # NOT LCOV_PATH - - if(NOT GENHTML_PATH) - message(FATAL_ERROR "genhtml not found! Aborting...") - endif() # NOT GENHTML_PATH - - # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR - if(${Coverage_BASE_DIRECTORY}) - get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE) - else() - set(BASEDIR ${PROJECT_SOURCE_DIR}) - endif() - - # Collect excludes (CMake 3.4+: Also compute absolute paths) - set(LCOV_EXCLUDES "") - foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_LCOV_EXCLUDES}) - if(CMAKE_VERSION VERSION_GREATER 3.4) - get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR}) - endif() - list(APPEND LCOV_EXCLUDES "${EXCLUDE}") - endforeach() - list(REMOVE_DUPLICATES LCOV_EXCLUDES) - - # Conditional arguments - if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE}) - set(GENHTML_EXTRA_ARGS "--demangle-cpp") - endif() - - message(${LCOV_EXCLUDES}) - - # Setup target - add_custom_target(${Coverage_NAME} - - # Cleanup lcov - COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -directory . -b ${BASEDIR} --zerocounters - # Create baseline to make sure untouched files show up in the report - COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c -i -d . -b ${BASEDIR} -o ${Coverage_NAME}.base - - # Run tests - COMMAND ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS} || exit 0 - - # Capturing lcov counters and generating report - COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory . -b ${BASEDIR} --capture --output-file ${Coverage_NAME}.capture - # add baseline counters - COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -a ${Coverage_NAME}.base -a ${Coverage_NAME}.capture --output-file ${Coverage_NAME}.total - # filter collected data to final coverage report - COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove ${Coverage_NAME}.total ${LCOV_EXCLUDES} --output-file ${Coverage_NAME}.info - - # Generate HTML output - COMMAND ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} -o ${Coverage_NAME} ${Coverage_NAME}.info - - COMMAND ${LCOV_PATH} -l ${Coverage_NAME}.info - - # Set output files as GENERATED (will be removed on 'make clean') - BYPRODUCTS - ${Coverage_NAME}.base - ${Coverage_NAME}.capture - ${Coverage_NAME}.total - ${Coverage_NAME}.info - # ${Coverage_NAME} # report directory - - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS ${Coverage_DEPENDENCIES} - VERBATIM - COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report." - ) - - # Show where to find the lcov info report - #add_custom_command(TARGET ${Coverage_NAME} POST_BUILD - # COMMAND ; - # COMMENT "Lcov code coverage info report saved in ${Coverage_NAME}.info." - #) - - # Show info where to find the report - #add_custom_command(TARGET ${Coverage_NAME} POST_BUILD - # COMMAND ; - # COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report." - #) - -endfunction() # setup_target_for_coverage_lcov - -# Defines a target for running and collection code coverage information -# Builds dependencies, runs the given executable and outputs reports. -# NOTE! The executable should always have a ZERO as exit code otherwise -# the coverage generation will not complete. -# -# setup_target_for_coverage_gcovr_xml( -# NAME ctest_coverage # New target name -# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR -# DEPENDENCIES executable_target # Dependencies to build first -# BASE_DIRECTORY "../" # Base directory for report -# # (defaults to PROJECT_SOURCE_DIR) -# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative -# # to BASE_DIRECTORY, with CMake 3.4+) -# ) -function(setup_target_for_coverage_gcovr_xml) - - set(options NONE) - set(oneValueArgs BASE_DIRECTORY NAME) - set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES) - cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(NOT GCOVR_PATH) - message(FATAL_ERROR "gcovr not found! Aborting...") - endif() # NOT GCOVR_PATH - - # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR - if(${Coverage_BASE_DIRECTORY}) - get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE) - else() - set(BASEDIR ${PROJECT_SOURCE_DIR}) - endif() - - # Collect excludes (CMake 3.4+: Also compute absolute paths) - set(GCOVR_EXCLUDES "") - foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES}) - if(CMAKE_VERSION VERSION_GREATER 3.4) - get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR}) - endif() - list(APPEND GCOVR_EXCLUDES "${EXCLUDE}") - endforeach() - list(REMOVE_DUPLICATES GCOVR_EXCLUDES) - - # Combine excludes to several -e arguments - set(GCOVR_EXCLUDE_ARGS "") - foreach(EXCLUDE ${GCOVR_EXCLUDES}) - list(APPEND GCOVR_EXCLUDE_ARGS "-e") - list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}") - endforeach() - - add_custom_target(${Coverage_NAME} - # Run tests - ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS} - - # Running gcovr - COMMAND ${GCOVR_PATH} --xml - -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} - --object-directory=${PROJECT_BINARY_DIR} - -o ${Coverage_NAME}.xml - BYPRODUCTS ${Coverage_NAME}.xml - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS ${Coverage_DEPENDENCIES} - VERBATIM # Protect arguments to commands - COMMENT "Running gcovr to produce Cobertura code coverage report." - ) - - # Show info where to find the report - add_custom_command(TARGET ${Coverage_NAME} POST_BUILD - COMMAND ; - COMMENT "Cobertura code coverage report saved in ${Coverage_NAME}.xml." - ) -endfunction() # setup_target_for_coverage_gcovr_xml - -# Defines a target for running and collection code coverage information -# Builds dependencies, runs the given executable and outputs reports. -# NOTE! The executable should always have a ZERO as exit code otherwise -# the coverage generation will not complete. -# -# setup_target_for_coverage_gcovr_html( -# NAME ctest_coverage # New target name -# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR -# DEPENDENCIES executable_target # Dependencies to build first -# BASE_DIRECTORY "../" # Base directory for report -# # (defaults to PROJECT_SOURCE_DIR) -# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative -# # to BASE_DIRECTORY, with CMake 3.4+) -# ) -function(setup_target_for_coverage_gcovr_html) - - set(options NONE) - set(oneValueArgs BASE_DIRECTORY NAME) - set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES) - cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(NOT GCOVR_PATH) - message(FATAL_ERROR "gcovr not found! Aborting...") - endif() # NOT GCOVR_PATH - - # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR - if(${Coverage_BASE_DIRECTORY}) - get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE) - else() - set(BASEDIR ${PROJECT_SOURCE_DIR}) - endif() - - # Collect excludes (CMake 3.4+: Also compute absolute paths) - set(GCOVR_EXCLUDES "") - foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES}) - if(CMAKE_VERSION VERSION_GREATER 3.4) - get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR}) - endif() - list(APPEND GCOVR_EXCLUDES "${EXCLUDE}") - endforeach() - list(REMOVE_DUPLICATES GCOVR_EXCLUDES) - - # Combine excludes to several -e arguments - set(GCOVR_EXCLUDE_ARGS "") - foreach(EXCLUDE ${GCOVR_EXCLUDES}) - list(APPEND GCOVR_EXCLUDE_ARGS "-e") - list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}") - endforeach() - - add_custom_target(${Coverage_NAME} - # Run tests - ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS} - - # Create folder - COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/${Coverage_NAME} - - # Running gcovr - COMMAND ${GCOVR_PATH} --html --html-details - -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} - --object-directory=${PROJECT_BINARY_DIR} - -o ${Coverage_NAME}/index.html - - BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME} # report directory - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS ${Coverage_DEPENDENCIES} - VERBATIM # Protect arguments to commands - COMMENT "Running gcovr to produce HTML code coverage report." - ) - - # Show info where to find the report - add_custom_command(TARGET ${Coverage_NAME} POST_BUILD - COMMAND ; - COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report." - ) - -endfunction() # setup_target_for_coverage_gcovr_html - -function(append_coverage_compiler_flags) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) - message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}") -endfunction() # append_coverage_compiler_flags diff --git a/generation_files/generate.py b/generation_files/generate.py deleted file mode 100644 index 2e7333b9..00000000 --- a/generation_files/generate.py +++ /dev/null @@ -1,97 +0,0 @@ -import os -import shutil -import subprocess - -culham_folder = '/home/emily/Code/culham-metric' -current_folder = os.path.dirname(__file__) - -python_folder = os.path.join(culham_folder, 'poisson_code', 'tests', 'python_code') - -qn_functions_file = os.path.join(python_folder, 'qn_functions.py') - -qn_gen_file = os.path.join(python_folder, 'main_qn_analytical.py') - -wrap_to_c = os.path.join(current_folder, 'wrap_c_to_class.py') - -out_folder = os.path.join(current_folder, 'out') - -src_folder = os.path.join(current_folder, '..', 'src') - -include_folder = os.path.join(current_folder, '..', 'include') - -PYTHON = shutil.which('python3') - -problems = { - 'CartesianR2' : '( 1 - s**2 ) * sp.cos( 2*sp.pi*x ) * sp.sin( 2*sp.pi*y )', - 'PolarR6' : '1e-4 * s**6*(s-1)**6/(0.5**12) * sp.cos( 11 * t )', - 'CartesianR6' : '1e-4 * (s+1)**6 * (s-1)**6/(0.5**12) * sp.cos( 2*sp.pi*x ) * sp.sin( 2*sp.pi*y )', - } - -coeffs = { - 'Sonnendrucker' : '2/(2.6 + 3.14)*(1.3 + sp.atan( (1-1.3*s)/0.09 ))', - 'Zoni' : 'sp.exp( - sp.tanh( ( s - 0.5 ) / 0.1 ) )', - 'ZoniShifted' : 'sp.exp( - sp.tanh( ( s - 0.7 ) / 0.05 ) )' - } - -geometry = { - 'Circular': 'circle', - 'Shafranov': 'shafranov', - 'Triangular': 'triangularity' - } - -for c, coeff_a in coeffs.items(): - for beta in (True, False): - coeff_b = '1/({})'.format(coeff_a) if beta else '0.0' - for p, phi in problems.items(): - for g, geom in geometry.items(): - classname = p+('Gyro' if beta else '')+c+g - print("Generating : ",classname) - with open(qn_functions_file, "w") as f: - print("import sympy as sp", file=f) - print("", file=f) - print("def phi_exact(s,t,x,y):", file=f) - print(f" return {phi}", file=f) - print("", file=f) - print("def coeffs1(s,t):", file=f) - print(f" return {coeff_a}", file=f) - print("", file=f) - print("def coeffs2(s,t):", file=f) - print(f" return {coeff_b}", file=f) - cmd = [PYTHON, qn_gen_file, 'cpp', '--mapping', geom, '--output', os.path.join(out_folder, classname), '--vectorise', '--Rmax'] - exc = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) - out, err = exc.communicate() - assert(exc.returncode==0) - - shutil.move(os.path.join(out_folder, classname+'.h'), os.path.join(include_folder, classname+'.h')) - shutil.move(os.path.join(out_folder, classname+'.cpp'), os.path.join(src_folder, classname+'.cpp')) - - shutil.rmtree(out_folder) - -c = 'Poisson' -coeff_a = '0.0' -coeff_b = '0.0' -for p, phi in problems.items(): - for g, geom in geometry.items(): - classname = p+c+g - print("Generating : ",classname) - with open(qn_functions_file, "w") as f: - print("import sympy as sp", file=f) - print("", file=f) - print("def phi_exact(s,t,x,y):", file=f) - print(f" return {phi}", file=f) - print("", file=f) - print("def coeffs1(s,t):", file=f) - print(f" return {coeff_a}", file=f) - print("", file=f) - print("def coeffs2(s,t):", file=f) - print(f" return {coeff_b}", file=f) - cmd = [PYTHON, qn_gen_file, 'cpp', '--mapping', geom, '--output', os.path.join(out_folder, classname), '--vectorise', '--Rmax'] - exc = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) - out, err = exc.communicate() - assert(exc.returncode==0) - - shutil.move(os.path.join(out_folder, classname+'.h'), os.path.join(include_folder, classname+'.h')) - shutil.move(os.path.join(out_folder, classname+'.cpp'), os.path.join(src_folder, classname+'.cpp')) - - shutil.rmtree('out') - diff --git a/include/DirectSolver/directSolver.h b/include/DirectSolver/directSolver.h new file mode 100644 index 00000000..b9851af5 --- /dev/null +++ b/include/DirectSolver/directSolver.h @@ -0,0 +1,96 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include + +#include "dmumps_c.h" +#include "mpi.h" + +#include "../InputFunctions/domainGeometry.h" +#include "../Level/level.h" +#include "../LinearAlgebra/Matrix/matrix.h" +#include "../LinearAlgebra/Vector/vector.h" +#include "../LinearAlgebra/Vector/vector_operations.h" +#include "../PolarGrid/polargrid.h" +#include "../Stencil/stencil.h" +#include "../common/constants.h" + +class DirectSolver +{ +public: + explicit DirectSolver(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + + ~DirectSolver(); + + void solveInPlace(Vector& solution); + +private: + const PolarGrid& grid_; + const LevelCache& level_cache_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + // Solver matrix and MUMPS solver structure + SparseMatrix solver_matrix_; + DMUMPS_STRUC_C mumps_solver_; + + // clang-format off + const Stencil stencil_interior_ = + {7, 4, 8, + 1, 0, 2, + 5, 3, 6}; + const Stencil stencil_across_origin_ = + {-1, 4, 6, + 1, 0, 2, + -1, 3, 5}; + const Stencil stencil_DB_ = + {-1, -1, -1, + -1, 0, -1, + -1, -1, -1}; + const Stencil stencil_next_inner_DB_ = + {-1, 3, 5, + -1, 0, 1, + -1, 2, 4}; + const Stencil stencil_next_outer_DB_ = + {5, 3, -1, + 1, 0, -1, + 4, 2, -1}; + // clang-format on + + // Constructs a symmetric solver matrix. + SparseMatrix buildSolverMatrix(); + void buildSolverMatrixCircleSection(const int i_r, SparseMatrix& solver_matrix); + void buildSolverMatrixRadialSection(const int i_theta, SparseMatrix& solver_matrix); + + // Initializes the MUMPS solver with the specified matrix. + void initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, const SparseMatrix& solver_matrix); + + // Adjusts the right-hand side vector to account for symmetry corrections. + // This transforms the system matrixA * solution = rhs into the equivalent system: + // symmetric(A) * solution = rhs - applySymmetryShift(rhs). + void applySymmetryShift(Vector& rhs) const; + void applySymmetryShiftInnerBoundary(Vector& x) const; + void applySymmetryShiftOuterBoundary(Vector& x) const; + + // Solves the adjusted system symmetric(matrixA) * solution = rhs using the MUMPS solver. + void solveWithMumps(Vector& solution); + + // Finalizes the MUMPS solver, releasing any allocated resources. + void finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver); + + // Returns the total number of non-zero elements in the solver matrix. + int getNonZeroCountSolverMatrix() const; + + // Returns the index of the first non-zero element in the solver matrix for the given position. + int getSolverMatrixIndex(int i_r, int i_theta) const; + + // Retrieves the stencil for the solver matrix at the given radial index. + const Stencil& getStencil(int i_r) const; +}; + diff --git a/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h b/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h new file mode 100644 index 00000000..f3a0de9e --- /dev/null +++ b/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h @@ -0,0 +1,74 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include + +#include "dmumps_c.h" +#include "mpi.h" + +#include "../../InputFunctions/domainGeometry.h" +#include "../../LinearAlgebra/Solvers/diagonal_solver.h" +#include "../../LinearAlgebra/Matrix/matrix.h" +#include "../../LinearAlgebra/Solvers/symmetric_tridiagonal_solver.h" +#include "../../LinearAlgebra/Vector/vector.h" +#include "../../LinearAlgebra/Vector/vector_operations.h" +#include "../../PolarGrid/polargrid.h" + +#include "../../Level/level.h" +#include "../../Stencil/stencil.h" +#include "../../common/constants.h" + +class ExtrapolatedSmootherTakeCPU +{ +public: + explicit ExtrapolatedSmootherTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + ~ExtrapolatedSmootherTakeCPU(); + + void extrapolatedSmoothingInPlace(Vector& x, const Vector& rhs, Vector& temp); + +private: + const PolarGrid& grid_; + const LevelCache& level_cache_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + SparseMatrix inner_boundary_circle_matrix_; + DMUMPS_STRUC_C inner_boundary_mumps_solver_; + std::vector> circle_diagonal_solver_; + std::vector> radial_diagonal_solver_; + std::vector> circle_tridiagonal_solver_; + std::vector> radial_tridiagonal_solver_; + + Stencil stencil_center_ = {-1, -1, -1, -1, 0, -1, -1, -1, -1}; + + Stencil stencil_center_left_ = {-1, -1, -1, 1, 0, -1, -1, -1, -1}; + + const Stencil& getStencil(int i_r, int i_theta) const; + int getNonZeroCountCircleAsc(const int i_r) const; + int getNonZeroCountRadialAsc(const int i_theta) const; + + int getCircleAscIndex(const int i_r, const int i_theta) const; + int getRadialAscIndex(const int i_r, const int i_theta) const; + + void buildAscMatrices(); + void buildAscCircleSection(const int i_r); + void buildAscRadialSection(const int i_theta); + + void applyAscOrthoCircleSection(const int i_r, const SmootherColor smoother_color, const Vector& x, + const Vector& rhs, Vector& temp); + void applyAscOrthoRadialSection(const int i_theta, const SmootherColor smoother_color, const Vector& x, + const Vector& rhs, Vector& temp); + + void solveCircleSection(const int i_r, Vector& x, Vector& temp, Vector& solver_storage_1, + Vector& solver_storage_2); + void solveRadialSection(const int i_theta, Vector& x, Vector& temp, Vector& solver_storage); + + void initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, const SparseMatrix& solver_matrix); + void finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver); +}; diff --git a/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h b/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h new file mode 100644 index 00000000..3c84f10e --- /dev/null +++ b/include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h @@ -0,0 +1,102 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include +#include +#include +#include +#include + + +#include "../../PolarGrid/polargrid.h" +#include "../../InputFunctions/boundaryConditions.h" +#include "../../InputFunctions/densityProfileCoefficients.h" +#include "../../InputFunctions/domainGeometry.h" +#include "../../InputFunctions/sourceTerm.h" +#include "../../Level/level.h" +#include "../../LinearAlgebra/Vector/gpu_vector.h" +#include "../../common/constants.h" + +#include "../../LinearAlgebra/Matrix/matrix.h" +#include "dmumps_c.h" +#include "mpi.h" + +class ExtrapolatedSmootherTakeGPU +{ +public: + explicit ExtrapolatedSmootherTakeGPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + ~ExtrapolatedSmootherTakeGPU(); + + void extrapolatedSmoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + +private: + /* ------------------- */ + /* Constructor members */ + const Level& level_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + /* Cuda Solvers */ + cusparseHandle_t sparse_handle_; + + /* Circle Tridiagonal Matrices */ + double* circle_main_diagonals_; + double* circle_lower_diagonals_; + double* circle_upper_diagonals_; + double* sherman_morrison_gammas_; + double* factor_; + /* Radial Tridiagonal Matrices */ + double* radial_main_diagonals_; + double* radial_lower_diagonals_; + double* radial_upper_diagonals_; + /* Tridiagonal Solver Buffer */ + void* pBuffer_; + /* Inner Boundary Mumps COO Matrix */ + std::unique_ptr inner_boundary_matrix_row_indices_; + std::unique_ptr inner_boundary_matrix_column_indices_; + std::unique_ptr inner_boundary_matrix_values_; + DMUMPS_STRUC_C inner_boundary_mumps_solver_; + int inner_boundary_matrix_nnz_; + int* d_inner_boundary_matrix_row_indices_; + int* d_inner_boundary_matrix_column_indices_; + double* d_inner_boundary_matrix_values_; + + /* Build Smoother Matrices we have allocated. */ + void buildAscMatrices(); + + void initializeMumps(); + void finalizeMumpsSolver(); + + /* The cyclic tridiagonal Matrices need to be adjusted to a system of a non-cyclic tridiagonal matrices. */ + void adjustAscCircle_ShermanMorrison(); + + /* temp is needed to prepare for the Sherman-Morrison formula. */ + void applyAscOrtho_BlackCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry); + void applyAscOrtho_WhiteCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry); + + void applyAscOrtho_BlackRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry); + void applyAscOrtho_WhiteRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry); + + + void solveAsc_BlackCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + void solveAsc_WhiteCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + void solveCircleDiagonals(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + void solveCircleTridiagonals(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + + void solveAsc_BlackRadial(GPU_Vector& x, const GPU_Vector& rhs); + void solveAsc_WhiteRadial(GPU_Vector& x, const GPU_Vector& rhs); +}; \ No newline at end of file diff --git a/include/GMGPolar/gmgpolar.h b/include/GMGPolar/gmgpolar.h new file mode 100644 index 00000000..5291df5e --- /dev/null +++ b/include/GMGPolar/gmgpolar.h @@ -0,0 +1,299 @@ +#pragma once + +// #include +// #include +// #include +#include +#include +// #include +// #include +// #include + +#include "../Utilities/cmdline.h" +#include "../common/constants.h" + +#include "../InputFunctions/boundaryConditions.h" +#include "../InputFunctions/densityProfileCoefficients.h" +#include "../InputFunctions/domainGeometry.h" +#include "../InputFunctions/exactSolution.h" +#include "../InputFunctions/sourceTerm.h" + +#include "../LinearAlgebra/Vector/vector.h" +#include "../LinearAlgebra/Vector/gpu_vector.h" + +#include "../PolarGrid/polargrid.h" + +#include "../Level/level.h" + +#include "../Interpolation/interpolation.h" + +// #include "../Level/level.h" +// #include "../LinearAlgebra/matrix.h" +// #include "../LinearAlgebra/Vector/vector.h" +// #include "../LinearAlgebra/Vector/vector_operations.h" +// #include "../PolarGrid/polargrid.h" +// #include "../Utilities/cmdline.h" +// #include "../common/constants.h" +// #include "test_cases.h" + +class GMGPolar +{ +public: + /* ------------------------ */ + /* GMGPoloar initialization */ + GMGPolar(std::unique_ptr domain_geometry, + std::unique_ptr density_profile_coefficients, + std::unique_ptr boundary_conditions, + std::unique_ptr source_term); + + void setParameters(int argc, char* argv[]); + void setSolution(std::unique_ptr exact_solution); + + /* ---------------------- */ + /* GMGPolar Setup & Solve */ + void setup(); + void solve(); + + // /* ----------------- */ + // /* GMGPolar Solution */ + // Vector& solution(); + // const Vector& solution() const; + // const PolarGrid& grid() const; + + // /* Solve Properties */ + // int numberOfIterations() const; + // double meanResidualReductionFactor() const; + // // Only when exact solution provided + // std::optional exactErrorWeightedEuclidean() const; + // std::optional exactErrorInfinity() const; + + // /* --------------- */ + // /* Grid Parameters */ + // double R0() const; + // void R0(double R0); + // double Rmax() const; + // void Rmax(double Rmax); + + // int nr_exp() const; + // void nr_exp(int nr_exp); + // int ntheta_exp() const; + // void ntheta_exp(int ntheta_exp); + + // int anisotropic_factor() const; + // void anisotropic_factor(int anisotropic_factor); + // int divideBy2() const; + // void divideBy2(int divideBy2); + + // bool write_grid_file() const; + // void write_grid_file(bool write_grid_file); + // bool load_grid_file() const; + // void load_grid_file(bool load_grid_file); + + // std::string file_grid_radii() const; + // void file_grid_radii(const std::string& file_name); + // std::string file_grid_angles() const; + // void file_grid_angles(const std::string& file_name); + + // /* ------------------- */ + // /* Geometry Parameters */ + // bool DirBC_Interior() const; + // void DirBC_Interior(bool DirBC_Interior); + + // /* -------------------- */ + // /* Multigrid Parameters */ + // bool FMG() const; + // void FMG(bool FMG); + // int FMG_iterations() const; + // void FMG_iterations(int FMG_iterations); + // MultigridCycleType FMG_cycle() const; + // void FMG_cycle(MultigridCycleType FMG_cycle); + + // ExtrapolationType extrapolation() const; + // void extrapolation(ExtrapolationType extrapolation); + + // int maxLevels() const; + // void maxLevels(int max_levels); + // MultigridCycleType multigridCycle() const; + // void multigridCycle(MultigridCycleType multigrid_cycle); + + // int preSmoothingSteps() const; + // void preSmoothingSteps(int pre_smoothing_steps); + // int postSmoothingSteps() const; + // void postSmoothingSteps(int post_smoothing_steps); + + // int maxIterations() const; + // void maxIterations(int max_iterations); + // ResidualNormType residualNormType() const; + // void residualNormType(ResidualNormType residual_norm_type); + // double absoluteTolerance() const; + // void absoluteTolerance(double absolute_tolerance); + // double relativeTolerance() const; + // void relativeTolerance(double relative_tolerance); + + // /* ------------------ */ + // /* Control Parameters */ + // int verbose() const; + // void verbose(int verbose); + // bool paraview() const; + // void paraview(bool paraview); + // int maxOpenMPThreads() const; + // void maxOpenMPThreads(int max_omp_threads); + // double threadReductionFactor() const; + // void threadReductionFactor(double thread_reduction_factor); + // StencilDistributionMethod stencilDistributionMethod() const; + // void stencilDistributionMethod(StencilDistributionMethod stencil_distribution_method); + // bool cacheDensityProfileCoefficients() const; + // void cacheDensityProfileCoefficients(bool cache_density_profile_coefficients); + // bool cacheDomainGeometry() const; + // void cacheDomainGeometry(bool cache_domain_geometry); + + /* --------*/ + /* Timings */ + void printTimings() const; + void resetTimings(); + + double t_setup_total = 0.0; + double t_setup_createLevels = 0.0; + double t_setup_rhs = 0.0; + double t_setup_smoother = 0.0; + double t_setup_directSolver = 0.0; + + double t_solve_total = 0.0; + double t_solve_initial_approximation = 0.0; + double t_solve_multigrid_iterations = 0.0; + double t_check_convergence = 0.0; + double t_check_exact_error = 0.0; + + double t_avg_MGC_total = 0.0; + double t_avg_MGC_preSmoothing = 0.0; + double t_avg_MGC_postSmoothing = 0.0; + double t_avg_MGC_residual = 0.0; + double t_avg_MGC_directSolver = 0.0; + +private: + /* --------------- */ + /* Grid Parameters */ + double R0_; + double Rmax_; + int nr_exp_; + int ntheta_exp_; + int anisotropic_factor_; + int divideBy2_; + /* ------------------- */ + /* Geometry Parameters */ + bool DirBC_Interior_; + /* -------------------- */ + /* Multigrid Parameters */ + bool FMG_; + int FMG_iterations_; + MultigridCycleType FMG_cycle_; + ExtrapolationType extrapolation_; + int max_levels_; + int gpu_levels_; + int pre_smoothing_steps_; + int post_smoothing_steps_; + MultigridCycleType multigrid_cycle_; + int max_iterations_; + ResidualNormType residual_norm_type_; + std::optional absolute_tolerance_; + std::optional relative_tolerance_; + /* ------------------ */ + /* Control Parameters */ + int verbose_; + bool paraview_; + int max_omp_threads_; + + /* --------------- */ + /* Input Functions */ + std::unique_ptr domain_geometry_; + std::unique_ptr density_profile_coefficients_; + std::unique_ptr boundary_conditions_; + std::unique_ptr source_term_; + std::unique_ptr exact_solution_ = nullptr; // Optional exact solution for validation + + /* ------------------------------ */ + /* Parser for GMGPolar parameters */ + cmdline::parser parser_; + + /* ---------------- */ + /* Multigrid levels */ + int number_of_levels_; + std::vector levels_; + + std::unique_ptr interpolation_; + + /* Chooses if full grid smoothing is active on level 0 for extrapolation > 0. */ + bool full_grid_smoothing_ = false; + + /* -------------------- */ + /* Convergence criteria */ + int number_of_iterations_; + std::vector residual_norms_; + double mean_residual_reduction_factor_; + bool converged(const double& current_residual_norm, const double& first_residual_norm); + + std::vector> exact_errors_; // Only when exact solution provided + std::pair computeExactError(Level& level, const Vector& solution, Vector& error); + std::pair computeExactError(Level& level, const GPU_Vector& solution, GPU_Vector& error); + + // /* ---------------------------------------- */ + // /* Parser Functions for GMGPolar Parameters */ + void initializeGrid(); + void initializeMultigrid(); + void initializeGeneral(); + + void parseGrid(); + void parseMultigrid(); + void parseGeneral(); + + // void selectTestCase(); + + /* --------------- */ + /* Setup Functions */ + PolarGrid createFinestGrid(); + int chooseNumberOfLevels(const PolarGrid& finest_grid); + + void build_rhs_f(const Level& level, Vector& rhs_f); + void discretize_rhs_f(const Level& level, Vector& rhs_f); + + void build_rhs_f(const Level& level, GPU_Vector& rhs_f); + void discretize_rhs_f(const Level& level, GPU_Vector& rhs_f); + + /* ------------------- */ + /* Multigrid Functions */ + void multigrid_V_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + void multigrid_W_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + void multigrid_F_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + void implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + void implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + void implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector& solution, Vector& rhs, Vector& residual); + + void multigrid_V_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + void multigrid_W_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + void multigrid_F_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + void implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + void implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + void implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, GPU_Vector& residual); + + + void prolongation(const int current_level, Vector& result, const Vector& x) const; + void restriction(const int current_level, Vector& result, const Vector& x) const; + void injection(const int current_level, Vector& result, const Vector& x) const; + void extrapolatedProlongation(const int current_level, Vector& result, const Vector& x) const; + void extrapolatedRestriction(const int current_level, Vector& result, const Vector& x) const; + void FMGInterpolation(const int current_level, Vector& result, const Vector& x) const; + + void prolongation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + void restriction(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + void injection(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + void extrapolatedProlongation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + void extrapolatedRestriction(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + void FMGInterpolation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const; + + void extrapolatedResidual(const int current_level, Vector& residual, const Vector& residual_next_level); + void extrapolatedResidual(const int current_level, GPU_Vector& residual, const GPU_Vector& residual_next_level); + + /* ------------- */ + /* Visualization */ + void writeToVTK(const std::filesystem::path& file_path, const PolarGrid& grid); +}; \ No newline at end of file diff --git a/include/InputFunctions/_README_.txt b/include/InputFunctions/_README_.txt new file mode 100644 index 00000000..91d2de80 --- /dev/null +++ b/include/InputFunctions/_README_.txt @@ -0,0 +1,6 @@ +Current settings: + +Geometry: Czarny +Problem: PolarR6 +Alpha: Sonnendrucker +Beta: Gyro diff --git a/include/InputFunctions/boundaryConditions.h b/include/InputFunctions/boundaryConditions.h new file mode 100644 index 00000000..34e3c26f --- /dev/null +++ b/include/InputFunctions/boundaryConditions.h @@ -0,0 +1,49 @@ +#pragma once + +#include +#include +#include + +#include "../common/constants.h" + +class BoundaryConditions +{ +public: + BoundaryConditions(); +#ifdef GEOM_SHAFRANOV + explicit BoundaryConditions( + const double& Rmax, const double& elongation_kappa, const double& shift_delta); +#else + explicit BoundaryConditions( + const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e); +#endif + + ~BoundaryConditions() = default; + + __host__ __device__ __forceinline__ + double u_D(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); + } + + /* Only used if DirBC_Interior = true */ + __host__ __device__ __forceinline__ + double u_D_Interior(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); + } + +private: + const double Rmax = 1.3; + +#ifdef GEOM_SHAFRANOV + // Shafranov + const double elongation_kappa = 0.3; + const double shift_delta = 0.2; +#else + // Czarny + const double inverse_aspect_ratio_epsilon = 0.3; + const double ellipticity_e = 1.4; + double factor_xi; + + void initializeGeometry(); +#endif +}; diff --git a/include/InputFunctions/densityProfileCoefficients.h b/include/InputFunctions/densityProfileCoefficients.h new file mode 100644 index 00000000..39d165dd --- /dev/null +++ b/include/InputFunctions/densityProfileCoefficients.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include + +#include "../common/constants.h" + +class DensityProfileCoefficients +{ +public: + DensityProfileCoefficients() = default; + explicit DensityProfileCoefficients(const double& Rmax, const double& alpha); + + ~DensityProfileCoefficients() = default; + + __host__ __device__ __forceinline__ + double alpha(const double& r) const { + return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); + } + + __host__ __device__ __forceinline__ + double beta(const double& r) const { + return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); + } + + // Only used in custom mesh generation -> refinement_radius + double getAlphaJump() const; + +private: + const double Rmax = 1.3; + const double alpha_jump = 0.66 * 1.3; +}; diff --git a/include/InputFunctions/domainGeometry.h b/include/InputFunctions/domainGeometry.h new file mode 100644 index 00000000..60817c98 --- /dev/null +++ b/include/InputFunctions/domainGeometry.h @@ -0,0 +1,103 @@ +#pragma once + +#include +#include +#include + +#include "../common/constants.h" + +class DomainGeometry { +public: + DomainGeometry(); +#ifdef GEOM_SHAFRANOV + explicit DomainGeometry(const double& Rmax, const double& elongation_kappa, const double& shift_delta); +#else + explicit DomainGeometry(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e); +#endif + + ~DomainGeometry() = default; + +#ifdef GEOM_SHAFRANOV + /* Invertible mapping F: \Omega_{Ref} -> \Omega. */ + __host__ __device__ __forceinline__ + double Fx(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return (1.0 - elongation_kappa) * (r/Rmax) * cos_theta - shift_delta * (r/Rmax) * (r/Rmax); + } + __host__ __device__ __forceinline__ + double Fy(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return (1.0 + elongation_kappa) * (r/Rmax) * sin_theta; + } + + /* Jacobian matrix of the mapping F. */ + __host__ __device__ __forceinline__ + double dFx_dr(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return ( (Rmax - elongation_kappa * Rmax) * cos_theta - 2.0 * shift_delta * r ) / ( Rmax * Rmax ); + } + __host__ __device__ __forceinline__ + double dFy_dr(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return (elongation_kappa + 1.0) * sin_theta / Rmax; + } + __host__ __device__ __forceinline__ + double dFx_dt(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return ((elongation_kappa - 1.0) * r * sin_theta) / Rmax; + } + __host__ __device__ __forceinline__ + double dFy_dt(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return ((elongation_kappa + 1.0) * r * cos_theta) / Rmax; + } +#else + /* Invertible mapping F: \Omega_{Ref} -> \Omega. */ + __host__ __device__ __forceinline__ + double Fx(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (inverse_aspect_ratio_epsilon + 2.0 * (r / Rmax) * cos_theta)); + return (1.0 - temp) / inverse_aspect_ratio_epsilon; + } + __host__ __device__ __forceinline__ + double Fy(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (inverse_aspect_ratio_epsilon + 2.0 * (r / Rmax) * cos_theta)); + return ellipticity_e * factor_xi * (r / Rmax) * sin_theta / (1.0 + (1.0 - temp)); + } + + /* Jacobian matrix of the mapping F. */ + __host__ __device__ __forceinline__ + double dFx_dr(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (2.0 * (r / Rmax) * cos_theta + inverse_aspect_ratio_epsilon)); + return -cos_theta / (Rmax * temp); + } + __host__ __device__ __forceinline__ + double dFy_dr(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (2.0 * (r / Rmax) * cos_theta + inverse_aspect_ratio_epsilon)); + return (ellipticity_e * factor_xi * sin_theta) / (Rmax * (2.0 - temp)) + + (ellipticity_e * factor_xi * inverse_aspect_ratio_epsilon * r * sin_theta * cos_theta) / + (Rmax * Rmax * temp * (2.0 - temp) * (2.0 - temp)); + } + __host__ __device__ __forceinline__ + double dFx_dt(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (2.0 * (r / Rmax) * cos_theta + inverse_aspect_ratio_epsilon)); + return (r / Rmax) * sin_theta / temp; + } + __host__ __device__ __forceinline__ + double dFy_dt(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + double temp = sqrt(1.0 + inverse_aspect_ratio_epsilon * (2.0 * (r / Rmax) * cos_theta + inverse_aspect_ratio_epsilon)); + return (ellipticity_e * factor_xi * (r / Rmax) * cos_theta) / (2.0 - temp) - + (ellipticity_e * factor_xi * inverse_aspect_ratio_epsilon * (r / Rmax) * (r / Rmax) * sin_theta * sin_theta) / + (temp * (2.0 - temp) * (2.0 - temp)); + } +#endif + +private: + const double Rmax = 1.3; + +#ifdef GEOM_SHAFRANOV + // Shafranov + const double elongation_kappa = 0.3; + const double shift_delta = 0.2; +#else + // Czarny + const double inverse_aspect_ratio_epsilon = 0.3; + const double ellipticity_e = 1.4; + double factor_xi; + + void initializeGeometry(); +#endif +}; diff --git a/include/InputFunctions/exactSolution.h b/include/InputFunctions/exactSolution.h new file mode 100644 index 00000000..bbead13c --- /dev/null +++ b/include/InputFunctions/exactSolution.h @@ -0,0 +1,41 @@ +#pragma once + +#include +#include +#include + +#include "../common/constants.h" + +class ExactSolution { +public: + ExactSolution(); + ~ExactSolution() = default; +#ifdef GEOM_SHAFRANOV + explicit ExactSolution(const double& Rmax, const double& elongation_kappa, const double& shift_delta); +#else + explicit ExactSolution(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e); +#endif + + __host__ __device__ + double exact_solution(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const { + return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); + } + +private: + const double Rmax = 1.3; + +#ifdef GEOM_SHAFRANOV + // Shafranov + const double elongation_kappa = 0.3; + const double shift_delta = 0.2; +#else + // Czarny + const double inverse_aspect_ratio_epsilon = 0.3; + const double ellipticity_e = 1.4; + double factor_xi; + + void initializeGeometry(); +#endif +}; + + diff --git a/include/InputFunctions/sourceTerm.h b/include/InputFunctions/sourceTerm.h new file mode 100644 index 00000000..2dd466cd --- /dev/null +++ b/include/InputFunctions/sourceTerm.h @@ -0,0 +1,334 @@ +#pragma once + +#include +#include +#include + +#include "../common/constants.h" + +class SourceTerm +{ +public: + SourceTerm(); +#ifdef GEOM_SHAFRANOV + explicit SourceTerm(const double& Rmax, const double& elongation_kappa, const double& shift_delta); +#else + explicit SourceTerm(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e); +#endif + ~SourceTerm() = default; + + + __host__ __device__ + double rhs_f(const double& r, const double& theta, const double& sin_theta, const double& cos_theta) const + { +#ifdef GEOM_SHAFRANOV + return (-pow((r / Rmax), 4.0)) * + ((-9.0112) * shift_delta * (r / Rmax) * + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (elongation_kappa - 1.0) * pow(((r / Rmax) - 1.0), 6.0) * sin_theta * sin(11.0 * theta) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) + + 4.5056 * (r / Rmax) * + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 6.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + ((-2.0) * shift_delta * (elongation_kappa - 1.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + sin_theta + + 2.0 * shift_delta * ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0)) * + sin(11.0 * theta) / + pow(((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)), + (3.0 / 2.0)) + + 27.0336 * (r / Rmax) * + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 5.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + sin(11.0 * theta) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) + + (r / Rmax) * + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (12.288 * (r / Rmax) * pow(((r / Rmax) - 1.0), 4.0) * cos(11.0 * theta) + + 17.2032 * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) + + (r / Rmax) * + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (2.4576 * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta) + + 2.4576 * pow(((r / Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * + ((-2.0) * shift_delta * (elongation_kappa - 1.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + sin_theta + + 2.0 * shift_delta * ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) / + pow(((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)), + (3.0 / 2.0)) - + 22.6762679055362 * (r / Rmax) * pow(((r / Rmax) - 1.0), 6.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + sin(11.0 * theta) / + (sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) * + (208.641975308642 * pow(((r / Rmax) - 0.769230769230769), 2.0) + 1.0)) - + 5.03290747193186 * (r / Rmax) * + (2.4576 * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta) + + 2.4576 * pow(((r / Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) / + (sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) * + (208.641975308642 * pow(((r / Rmax) - 0.769230769230769), 2.0) + 1.0)) - + 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 6.0) * + (pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + cos(11.0 * theta) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) - + 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 6.0) * + (pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (4.0 * elongation_kappa * + (pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + sin_theta * cos_theta - + 1.0 / 2.0 * + (pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta) + + (2.0 * elongation_kappa - 2.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) + + 1.0 / 2.0 * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + (2.0 * pow((elongation_kappa - 1.0), 2.0) * pow(sin_theta, 2.0) + + 2.0 * (elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * cos_theta + + 2.0 * pow((elongation_kappa + 1.0), 2.0) * cos(2.0 * theta))) * + sin(11.0 * theta) / + pow(((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)), + (3.0 / 2.0)) - + 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 6.0) * + (pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta) + + (2.0 * elongation_kappa - 2.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta) * + sin(11.0 * theta) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) + + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + pow(((r / Rmax) - 1.0), 6.0) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + sin(11.0 * theta) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) - + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + ((-27.0336) * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * sin(11.0 * theta) - + 27.0336 * pow(((r / Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) - + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (2.4576 * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta) + + 2.4576 * pow(((r / Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * + (pow((elongation_kappa - 1.0), 2.0) * pow(sin_theta, 2.0) + + (elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * cos_theta + + pow((elongation_kappa + 1.0), 2.0) * cos(2.0 * theta)) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) + + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (2.4576 * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta) + + 2.4576 * pow(((r / Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)) - + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r / Rmax) - 11.1111111111111)) * + (2.4576 * (r / Rmax) * pow(((r / Rmax) - 1.0), 5.0) * cos(11.0 * theta) + + 2.4576 * pow(((r / Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + (4.0 * elongation_kappa * + (pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + sin_theta * cos_theta - + 1.0 / 2.0 * + (pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta) + + (2.0 * elongation_kappa - 2.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) + + 1.0 / 2.0 * + ((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)) * + (2.0 * pow((elongation_kappa - 1.0), 2.0) * pow(sin_theta, 2.0) + + 2.0 * (elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * cos_theta + + 2.0 * pow((elongation_kappa + 1.0), 2.0) * cos(2.0 * theta))) / + pow(((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * + sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)), + (3.0 / 2.0))) / + sqrt((pow((elongation_kappa + 1.0), 2.0) * pow(sin_theta, 2.0) + + pow(((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta), 2.0)) * + (elongation_kappa * elongation_kappa - 4.0 * elongation_kappa * pow(sin_theta, 2.0) + + 2.0 * elongation_kappa + 1.0) - + pow(((elongation_kappa - 1.0) * + ((-2.0) * shift_delta * (r / Rmax) - elongation_kappa * cos_theta + cos_theta) * sin_theta + + 1.0 / 2.0 * pow((elongation_kappa + 1.0), 2.0) * sin(2.0 * theta)), + 2.0)); +#else + double temp = sqrt(inverse_aspect_ratio_epsilon * (inverse_aspect_ratio_epsilon + 2.0 * (r/Rmax) * cos_theta) + 1.0); + return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * (1.0 / 2.0 * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * (4.0 * inverse_aspect_ratio_epsilon * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + 2.0 * ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp)) + 2.0 * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) - 1.0 / 2.0 * ((-2.0) * inverse_aspect_ratio_epsilon * pow(cos_theta, 3.0) / pow((temp * temp), 2.0) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * ((-2.0) * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) + 4.0 * ellipticity_e * inverse_aspect_ratio_epsilon * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) - 1.0 / 2.0 * ((-2.0) * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) * sin(11.0 * theta) / pow(((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * inverse_aspect_ratio_epsilon * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp)) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) * sin(11.0 * theta) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * sin(11.0 * theta) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (1.0 / 2.0 * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * (4.0 * inverse_aspect_ratio_epsilon * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + 2.0 * ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp)) + 2.0 * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) - 1.0 / 2.0 * ((-2.0) * inverse_aspect_ratio_epsilon * pow(cos_theta, 3.0) / pow((temp * temp), 2.0) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * ((-2.0) * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) + 4.0 * ellipticity_e * inverse_aspect_ratio_epsilon * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) - 1.0 / 2.0 * ((-2.0) * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp))) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) / pow(((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * sin(11.0 * theta) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)))) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * sin(11.0 * theta) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)) * cos(11.0 * theta) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 4.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) - 2.0 * sin_theta * cos_theta / (temp * temp)) * sin(11.0 * theta) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)) * (1.0 / 2.0 * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * ((-4.0) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + 2.0 * ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) + 2.0 * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 3.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) - ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) + 2.0 * pow(sin_theta, 2.0) / (temp * temp) - 2.0 * pow(cos_theta, 2.0) / (temp * temp)) - 1.0 / 2.0 * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (2.0 * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 4.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) - 2.0 * sin_theta * cos_theta / (temp * temp)) - 1.0 / 2.0 * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)) * (2.0 * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 3.0) / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * ((-2.0) * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 6.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) - 2.0 * ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) + 2.0 * sin_theta * cos_theta / (temp * temp))) * sin(11.0 * theta) / pow(((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)) * ((-4.0) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + 2.0 * ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) + 2.0 * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 3.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) - ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) + 2.0 * pow(sin_theta, 2.0) / (temp * temp) - 2.0 * pow(cos_theta, 2.0) / (temp * temp)) - 1.0 / 2.0 * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (2.0 * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * pow(cos_theta, 2.0) / pow((temp * temp), 2.0) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * (2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 4.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + 2.0 * ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) - 2.0 * sin_theta * cos_theta / (temp * temp)) - 1.0 / 2.0 * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)) * (2.0 * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 3.0) / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * ((-2.0) * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 4.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 6.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) - 2.0 * ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) + 2.0 * sin_theta * cos_theta / (temp * temp))) / pow(((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * cos_theta / pow((temp * temp), 2.0) + ((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) - 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 2.0) * cos_theta * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 2.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(cos_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) + (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) * ((-ellipticity_e) * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 2.0) * pow((temp * temp), (3.0 / 2.0))) + 2.0 * ellipticity_e * (inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta, 3.0) * factor_xi / ( pow((2.0 - temp), 3.0) * (temp * temp)) - 3.0 * ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) - ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) + pow(sin_theta, 2.0) / (temp * temp) - pow(cos_theta, 2.0) / (temp * temp)) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp)))) / sqrt((-pow((((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))) * (ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))) - sin_theta * cos_theta / (temp * temp)), 2.0)) + (pow(((-ellipticity_e) * inverse_aspect_ratio_epsilon * (r/Rmax) * pow(sin_theta, 2.0) * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * cos_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(sin_theta, 2.0) / (temp * temp)) * (pow((ellipticity_e * inverse_aspect_ratio_epsilon * (r/Rmax) * sin_theta * cos_theta * factor_xi / ( pow((2.0 - temp), 2.0) * temp) + ellipticity_e * sin_theta * factor_xi / ( (2.0 - temp))), 2.0) + pow(cos_theta, 2.0) / (temp * temp))); +#endif + } + +private: + const double Rmax = 1.3; + +#ifdef GEOM_SHAFRANOV + // Shafranov + const double elongation_kappa = 0.3; + const double shift_delta = 0.2; +#else + // Czarny + const double inverse_aspect_ratio_epsilon = 0.3; + const double ellipticity_e = 1.4; + double factor_xi; + + void initializeGeometry(); +#endif + +}; diff --git a/include/Interpolation/interpolation.h b/include/Interpolation/interpolation.h new file mode 100644 index 00000000..c5e0aba0 --- /dev/null +++ b/include/Interpolation/interpolation.h @@ -0,0 +1,44 @@ +#pragma once + +#include +#include +#include + +#include + +#include "../PolarGrid/polargrid.h" +#include "../Level/level.h" + +#include "../LinearAlgebra/Vector/vector.h" + +#include "../LinearAlgebra/Vector/gpu_vector.h" + +#include "../common/constants.h" + +class Interpolation { +public: + explicit Interpolation(const bool DirBC_Interior); + + /* Remark: This injection is not scaled. */ + void applyInjection(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyInjection(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + + /* Bilinear interpolation operator */ + void applyProlongation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyProlongation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + void applyExtrapolatedProlongation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyExtrapolatedProlongation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + + /* Scaled full weighting (FW) restriction operator. */ + void applyRestriction(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyRestriction(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + void applyExtrapolatedRestriction(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyExtrapolatedRestriction(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + + /* Bicubic FMG interpolator 1/16 * [-1, 9, 9, -1] */ + void applyFMGInterpolation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const; + void applyFMGInterpolation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const; + +private: + const bool DirBC_Interior_; +}; \ No newline at end of file diff --git a/include/Level/level.h b/include/Level/level.h new file mode 100644 index 00000000..7f94a8d3 --- /dev/null +++ b/include/Level/level.h @@ -0,0 +1,194 @@ +#pragma once + +class DirectSolver; +class ResidualTakeCPU; +class SmootherTakeCPU; +class ExtrapolatedSmootherTakeCPU; +class ResidualTakeGPU; +class SmootherTakeGPU; +class ExtrapolatedSmootherTakeGPU; + + +#include +#include +#include + +#include "../common/constants.h" + +#include "../PolarGrid/polargrid.h" + +#include "../LinearAlgebra/Vector/vector.h" +#include "../LinearAlgebra/Vector/gpu_vector.h" + +#include "../InputFunctions/boundaryConditions.h" +#include "../InputFunctions/densityProfileCoefficients.h" +#include "../InputFunctions/domainGeometry.h" +#include "../InputFunctions/sourceTerm.h" + + +#include "../DirectSolver/directSolver.h" + +#include "../Residual/ResidualTakeCPU/residual.h" +#include "../Smoother/SmootherTakeCPU/smoother.h" +#include "../ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +#include "../Residual/ResidualTakeGPU/residual.h" +#include "../Smoother/SmootherTakeGPU/smoother.h" +#include "../ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +class LevelCache; + +class Level +{ +public: + // ----------- // + // Constructor // + + explicit Level(const int level, + const ProcessingType processing_type, + std::unique_ptr grid, + std::unique_ptr level_cache, + const ExtrapolationType extrapolation, + const bool FMG); + + ~Level(); + // Move Constructor / Assignment + Level(Level&& other) noexcept; + Level& operator=(Level&& other) noexcept; + // Copy Constructor (Deleted to avoid accidental copies) + Level(const Level& other) = delete; + + // ---------------- // + // Getter Functions // + int level() const; + ProcessingType processingType() const; + const PolarGrid& grid() const; + PolarGrid* device_grid() const; + const LevelCache& levelCache() const; + + Vector& rhs(); + const Vector& rhs() const; + Vector& solution(); + const Vector& solution() const; + Vector& residual(); + const Vector& residual() const; + Vector& error_correction(); + const Vector& error_correction() const; + + GPU_Vector& GPU_rhs(); + const GPU_Vector& GPU_rhs() const; + GPU_Vector& GPU_solution(); + const GPU_Vector& GPU_solution() const; + GPU_Vector& GPU_residual(); + const GPU_Vector& GPU_residual() const; + GPU_Vector& GPU_error_correction(); + const GPU_Vector& GPU_error_correction() const; + + + // -------------- // + // Apply Residual // + void initializeResidual(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior); + void computeResidual(Vector& result, const Vector& rhs, const Vector& x) const; + void computeResidual(GPU_Vector& result, const GPU_Vector& rhs, const GPU_Vector& x) const; + + // ------------------- // + // Solve coarse System // + void initializeDirectSolver(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior); + void directSolveInPlace(Vector& x) const; + + // --------------- // + // Apply Smoothing // + void initializeSmoothing(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior); + void smoothingInPlace(Vector& x, const Vector& rhs, Vector& temp) const; + void smoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) const; + + // ---------------------------- // + // Apply Extrapolated Smoothing // + void initializeExtrapolatedSmoothing(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior); + void extrapolatedSmoothingInPlace(Vector& x, const Vector& rhs, Vector& temp) const; + void extrapolatedSmoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) const; + +private: + int level_; + ProcessingType processing_type_; + std::unique_ptr grid_; + PolarGrid* device_grid_; + std::unique_ptr level_cache_; + ExtrapolationType extrapolation_; + int FMG_; + + std::unique_ptr op_directSolver_; + + std::unique_ptr op_residual_CPU_; + std::unique_ptr op_smoother_CPU_; + std::unique_ptr op_extrapolated_smoother_CPU_; + + std::unique_ptr op_residual_GPU_; + std::unique_ptr op_smoother_GPU_; + std::unique_ptr op_extrapolated_smoother_GPU_; + + Vector rhs_; + Vector solution_; + Vector residual_; + Vector error_correction_; + + GPU_Vector gpu_rhs_; + GPU_Vector gpu_solution_; + GPU_Vector gpu_residual_; + GPU_Vector gpu_error_correction_; +}; + + +class LevelCache +{ +public: + explicit LevelCache(const ProcessingType processing_type, + const PolarGrid& grid, + const DensityProfileCoefficients& density_profile_coefficients, + const DomainGeometry& domain_geometry); + + const std::vector& sin_theta() const; + const std::vector& cos_theta() const; + + const std::vector& coeff_alpha() const; + const std::vector& coeff_beta() const; + + const Vector& arr() const; + const Vector& att() const; + const Vector& art() const; + const Vector& detDF() const; + + const GPU_Vector& GPU_sin_theta() const; + const GPU_Vector& GPU_cos_theta() const; + + const GPU_Vector& GPU_coeff_alpha() const; + const GPU_Vector& GPU_coeff_beta() const; + +private: + const ProcessingType processing_type_; + + std::vector sin_theta_; + std::vector cos_theta_; + + std::vector coeff_alpha_; + std::vector coeff_beta_; + + Vector arr_; + Vector att_; + Vector art_; + Vector detDF_; + + GPU_Vector gpu_sin_theta_; + GPU_Vector gpu_cos_theta_; + + GPU_Vector gpu_coeff_alpha_; + GPU_Vector gpu_coeff_beta_; +}; diff --git a/include/LinearAlgebra/Matrix/matrix.h b/include/LinearAlgebra/Matrix/matrix.h new file mode 100644 index 00000000..ea049070 --- /dev/null +++ b/include/LinearAlgebra/Matrix/matrix.h @@ -0,0 +1,353 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* Matrix on the host in COO-Format */ + +template +class SparseMatrix +{ +public: + using triplet_type = std::tuple; + + SparseMatrix(); + SparseMatrix(const SparseMatrix& other); + SparseMatrix(SparseMatrix&& other) noexcept; + + explicit SparseMatrix(int rows, int columns, int nnz); + explicit SparseMatrix(int rows, int columns, const std::vector& entries); + + SparseMatrix& operator=(const SparseMatrix& other); + SparseMatrix& operator=(SparseMatrix&& other) noexcept; + + int rows() const; + int columns() const; + int non_zero_size() const; + + const int& row_index(int nz_index) const; + int& row_index(int nz_index); + + const int& col_index(int nz_index) const; + int& col_index(int nz_index); + + const T& value(int nz_index) const; + T& value(int nz_index); + + bool is_symmetric() const; + void is_symmetric(bool value); + + int* row_indices_data() const; + int* column_indices_data() const; + T* values_data() const; + + template + friend std::ostream& operator<<(std::ostream& stream, const SparseMatrix& matrix); + + void write_to_file(const std::string& filename) const; + +private: + int rows_; + int columns_; + int nnz_; + std::unique_ptr row_indices_; + std::unique_ptr column_indices_; + std::unique_ptr values_; + bool is_symmetric_ = false; +}; + +template +std::ostream& operator<<(std::ostream& stream, const SparseMatrix& matrix) +{ + stream << "SparseMatrix: " << matrix.rows_ << " x " << matrix.columns_ << "\n"; + stream << "Number of non-zeros (nnz): " << matrix.nnz_ << "\n"; + if (matrix.is_symmetric_) + { + stream << "Matrix is symmetric.\n"; + } + stream << "Non-zero elements (row, column, value):\n"; + for (int i = 0; i < matrix.nnz_; ++i) + { + stream << "(" << matrix.row_indices_[i] << ", " << matrix.column_indices_[i] << ", " << matrix.values_[i] << ")\n"; + } + return stream; +} + +template +void SparseMatrix::write_to_file(const std::string& filename) const +{ + std::ofstream file(filename); + if (!file.is_open()) + { + throw std::runtime_error("Unable to open file"); + } + file << "SparseMatrix: " << rows_ << " x " << columns_ << "\n"; + file << "Number of non-zeros (nnz): " << nnz_ << "\n"; + if (is_symmetric_) + { + file << "Matrix is symmetric.\n"; + } + file << "Non-zero elements (row, column, value):\n"; + for (int i = 0; i < nnz_; ++i) + { + file << "(" << row_indices_[i] << ", " << column_indices_[i] << ", " << values_[i] << ")\n"; + } + file.close(); +} + +template +void sort_entries(std::vector>& entries) +{ + const auto compare = [](const auto entry1, const auto entry2) + { + const auto local_r1 = std::get<0>(entry1); + const auto local_r2 = std::get<0>(entry2); + if (local_r1 < local_r2) + { + return true; + } + else if (local_r1 == local_r2) + { + return std::get<1>(entry1) < std::get<1>(entry2); + } + return false; + }; + std::sort(entries.begin(), entries.end(), compare); +} + +// default construction +template +SparseMatrix::SparseMatrix() + : rows_(0) + , columns_(0) + , nnz_(0) + , row_indices_(nullptr) + , column_indices_(nullptr) + , values_(nullptr) + , is_symmetric_(false) +{ +} + +// copy construction +template +SparseMatrix::SparseMatrix(const SparseMatrix& other) + : rows_(other.rows_) + , columns_(other.columns_) + , nnz_(other.nnz_) + , row_indices_(std::make_unique(nnz_)) + , column_indices_(std::make_unique(nnz_)) + , values_(std::make_unique(nnz_)) + , is_symmetric_(other.is_symmetric_) +{ + std::copy(other.row_indices_.get(), other.row_indices_.get() + nnz_, row_indices_.get()); + std::copy(other.column_indices_.get(), other.column_indices_.get() + nnz_, column_indices_.get()); + std::copy(other.values_.get(), other.values_.get() + nnz_, values_.get()); +} + +// copy assignment +template +SparseMatrix& SparseMatrix::operator=(const SparseMatrix& other) +{ + if (this == &other) + { + // Self-assignment, no work needed + return *this; + } + // Only allocate new memory if the sizes are different + if (nnz_ != other.nnz_) + { + row_indices_ = std::make_unique(nnz_); + column_indices_ = std::make_unique(nnz_); + values_ = std::make_unique(nnz_); + } + // Copy the elements + rows_ = other.rows_; + columns_ = other.columns_; + nnz_ = other.nnz_; + is_symmetric_ = other.is_symmetric_; + std::copy(other.row_indices_.get(), other.row_indices_.get() + nnz_, row_indices_.get()); + std::copy(other.column_indices_.get(), other.column_indices_.get() + nnz_, column_indices_.get()); + std::copy(other.values_.get(), other.values_.get() + nnz_, values_.get()); + return *this; +} + +// move construction +template +SparseMatrix::SparseMatrix(SparseMatrix&& other) noexcept + : rows_(other.rows_) + , columns_(other.columns_) + , nnz_(other.nnz_) + , row_indices_(std::move(other.row_indices_)) + , column_indices_(std::move(other.column_indices_)) + , values_(std::move(other.values_)) + , is_symmetric_(other.is_symmetric_) +{ + other.nnz_ = 0; + other.rows_ = 0; + other.columns_ = 0; + other.is_symmetric_ = false; +} + +// move assignment +template +SparseMatrix& SparseMatrix::operator=(SparseMatrix&& other) noexcept +{ + rows_ = other.rows_; + columns_ = other.columns_; + nnz_ = other.nnz_; + row_indices_ = std::move(other.row_indices_); + column_indices_ = std::move(other.column_indices_); + values_ = std::move(other.values_); + is_symmetric_ = other.is_symmetric_; + other.nnz_ = 0; + other.rows_ = 0; + other.columns_ = 0; + other.is_symmetric_ = false; + return *this; +} + +template +SparseMatrix::SparseMatrix(int rows, int columns, int nnz) + : rows_(rows) + , columns_(columns) + , nnz_(nnz) + , row_indices_(std::make_unique(nnz)) + , column_indices_(std::make_unique(nnz)) + , values_(std::make_unique(nnz)) + , is_symmetric_(false) +{ + assert(rows >= 0); + assert(columns >= 0); + assert(nnz >= 0); +} + +template +SparseMatrix::SparseMatrix(int rows, int columns, const std::vector& entries) + : // entries: row_idx, col_idx, value + rows_(rows) + , columns_(columns) + , nnz_(entries.size()) + , row_indices_(std::make_unique(nnz_)) + , column_indices_(std::make_unique(nnz_)) + , values_(std::make_unique(nnz_)) + , is_symmetric_(false) +{ + assert(rows_ >= 0); + assert(columns_ >= 0); + assert(nnz_ >= 0); +#pragma omp parallel for + for (int i = 0; i < nnz_; i++) + { + assert(0 <= std::get<0>(entries[i]) && std::get<0>(entries[i]) < rows_); + assert(0 <= std::get<1>(entries[i]) && std::get<1>(entries[i]) < columns_); + row_indices_[i] = std::get<0>(entries[i]); + column_indices_[i] = std::get<1>(entries[i]); + values_[i] = std::get<2>(entries[i]); + } +} + +template +int SparseMatrix::rows() const +{ + assert(this->rows_ >= 0); + return this->rows_; +} +template +int SparseMatrix::columns() const +{ + assert(this->columns_ >= 0); + return this->columns_; +} +template +int SparseMatrix::non_zero_size() const +{ + assert(this->nnz_ >= 0); + assert(static_cast(this->nnz_) <= static_cast(this->rows_) * static_cast(this->columns_)); + return this->nnz_; +} + +template +int& SparseMatrix::row_index(int nz_index) +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->row_indices_[nz_index]; +} +template +const int& SparseMatrix::row_index(int nz_index) const +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->row_indices_[nz_index]; +} + +template +int& SparseMatrix::col_index(int nz_index) +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->column_indices_[nz_index]; +} +template +const int& SparseMatrix::col_index(int nz_index) const +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->column_indices_[nz_index]; +} + +template +T& SparseMatrix::value(int nz_index) +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->values_[nz_index]; +} +template +const T& SparseMatrix::value(int nz_index) const +{ + assert(nz_index >= 0); + assert(nz_index < this->nnz_); + return this->values_[nz_index]; +} + +template +bool SparseMatrix::is_symmetric() const +{ + return is_symmetric_; +} +template +void SparseMatrix::is_symmetric(bool value) +{ + is_symmetric_ = value; +} + +template +int* SparseMatrix::row_indices_data() const +{ + return row_indices_.get(); +} + +template +int* SparseMatrix::column_indices_data() const +{ + return column_indices_.get(); +} + +template +T* SparseMatrix::values_data() const +{ + return values_.get(); +} \ No newline at end of file diff --git a/include/LinearAlgebra/Solvers/diagonal_solver.h b/include/LinearAlgebra/Solvers/diagonal_solver.h new file mode 100644 index 00000000..01294cfc --- /dev/null +++ b/include/LinearAlgebra/Solvers/diagonal_solver.h @@ -0,0 +1,168 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +#include "../../common/equals.h" + +template +class DiagonalSolver +{ +public: + DiagonalSolver(); + DiagonalSolver(const DiagonalSolver& other); + DiagonalSolver(DiagonalSolver&& other) noexcept; + + explicit DiagonalSolver(const int matrix_dimension); + + DiagonalSolver& operator=(const DiagonalSolver& other); + DiagonalSolver& operator=(DiagonalSolver&& other) noexcept; + + int rows() const; + int columns() const; + + const T& diagonal(const int index) const; + T& diagonal(const int index); + + void solveInPlace(T* sol_rhs) const; + + template + friend std::ostream& operator<<(std::ostream& stream, const DiagonalSolver& solver); + +private: + int matrix_dimension_; + std::unique_ptr diagonal_values_; +}; + +template +std::ostream& operator<<(std::ostream& stream, const DiagonalSolver& solver) +{ + stream << "Diagonal Matrix (Dimension: " << solver.matrix_dimension_ << " x " << solver.matrix_dimension_ << ")\n"; + + stream << "Diagonal Elements: ["; + for (int i = 0; i < solver.matrix_dimension_; ++i) { + stream << solver.diagonal(i); + if (i != solver.matrix_dimension_ - 1) + stream << ", "; + } + stream << "]\n"; + + return stream; +} + +// default construction +template +DiagonalSolver::DiagonalSolver() + : matrix_dimension_(0) + , diagonal_values_(nullptr) +{ +} + +// copy construction +template +DiagonalSolver::DiagonalSolver(const DiagonalSolver& other) + : matrix_dimension_(other.matrix_dimension_) + , diagonal_values_(std::make_unique(matrix_dimension_)) +{ + // Consider using a parllized OpenMP For-Loop instead + std::copy(other.diagonal_values_.get(), other.diagonal_values_.get() + matrix_dimension_, diagonal_values_.get()); +} + +// copy assignment +template +DiagonalSolver& DiagonalSolver::operator=(const DiagonalSolver& other) +{ + if (this == &other) { + // Self-assignment, no work needed + return *this; + } + // Only allocate new memory if the sizes are different + if (matrix_dimension_ != other.matrix_dimension_) { + matrix_dimension_ = other.matrix_dimension_; + diagonal_values_ = std::make_unique(matrix_dimension_); + } + // Consider using a parllized OpenMP For-Loop instead + std::copy(other.diagonal_values_.get(), other.diagonal_values_.get() + matrix_dimension_, diagonal_values_.get()); + return *this; +} + +// move construction +template +DiagonalSolver::DiagonalSolver(DiagonalSolver&& other) noexcept + : matrix_dimension_(other.matrix_dimension_) + , diagonal_values_(std::move(other.diagonal_values_)) +{ + other.matrix_dimension_ = 0; +} + +// move assignment +template +DiagonalSolver& DiagonalSolver::operator=(DiagonalSolver&& other) noexcept +{ + matrix_dimension_ = other.matrix_dimension_; + diagonal_values_ = std::move(other.diagonal_values_); + other.matrix_dimension_ = 0; + return *this; +} + +template +DiagonalSolver::DiagonalSolver(const int matrix_dimension) + : matrix_dimension_(matrix_dimension) + , diagonal_values_(std::make_unique(matrix_dimension_)) +{ + assert(matrix_dimension_ >= 1); +} + +template +int DiagonalSolver::rows() const +{ + assert(this->matrix_dimension_ >= 0); + return this->matrix_dimension_; +} +template +int DiagonalSolver::columns() const +{ + assert(this->matrix_dimension_ >= 0); + return this->matrix_dimension_; +} + +template +const T& DiagonalSolver::diagonal(const int index) const +{ + assert(index >= 0); + assert(index < this->matrix_dimension_); + return this->diagonal_values_[index]; +} +template +T& DiagonalSolver::diagonal(const int index) +{ + assert(index >= 0); + assert(index < this->matrix_dimension_); + return this->diagonal_values_[index]; +} + +// --------------- // +// Diagonal Solver // +// --------------- // + +template +void DiagonalSolver::solveInPlace(T* sol_rhs) const +{ + for (int i = 0; i < matrix_dimension_; i++) { + assert(!equals(diagonal(i), 0.0)); + sol_rhs[i] /= diagonal(i); + } +} \ No newline at end of file diff --git a/include/LinearAlgebra/Solvers/symmetric_tridiagonal_solver.h b/include/LinearAlgebra/Solvers/symmetric_tridiagonal_solver.h new file mode 100644 index 00000000..aa71a794 --- /dev/null +++ b/include/LinearAlgebra/Solvers/symmetric_tridiagonal_solver.h @@ -0,0 +1,396 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../common/equals.h" + +template +class SymmetricTridiagonalSolver +{ +public: + SymmetricTridiagonalSolver(); + SymmetricTridiagonalSolver(const SymmetricTridiagonalSolver& other); + SymmetricTridiagonalSolver(SymmetricTridiagonalSolver&& other) noexcept; + + explicit SymmetricTridiagonalSolver(const int matrix_dimension); + + SymmetricTridiagonalSolver& operator=(const SymmetricTridiagonalSolver& other); + SymmetricTridiagonalSolver& operator=(SymmetricTridiagonalSolver&& other) noexcept; + + void is_cyclic(bool value); + bool is_cyclic() const; + + int rows() const; + int columns() const; + + const T& main_diagonal(const int index) const; + T& main_diagonal(const int index); + + const T& sub_diagonal(const int index) const; + T& sub_diagonal(const int index); + + const T& cyclic_corner_element() const; + T& cyclic_corner_element(); + + // Unified Solve method + void solveInPlace(T* sol_rhs, T* temp1, T* temp2 = nullptr); + + template + friend std::ostream& operator<<(std::ostream& stream, const SymmetricTridiagonalSolver& solver); + +private: + int matrix_dimension_; + std::unique_ptr main_diagonal_values_; + std::unique_ptr sub_diagonal_values_; + T cyclic_corner_element_ = 0.0; + bool is_cyclic_ = true; + + bool factorized_ = false; + T gamma_ = 0.0; + + // Solve methods + void solveSymmetricTridiagonal(T* x, T* scratch); + void solveSymmetricCyclicTridiagonal(T* x, T* u, T* scratch); +}; + +template +std::ostream& operator<<(std::ostream& stream, const SymmetricTridiagonalSolver& solver) +{ + stream << "Symmetric Tridiagonal Matrix (Dimension: " << solver.matrix_dimension_ << ")\n"; + + if (solver.factorized_) { + // Print the L, D decomposition if factorized + stream << "L Factor (Sub Diagonal Elements): ["; + for (int i = 0; i < solver.matrix_dimension_ - 1; ++i) { + stream << solver.sub_diagonal(i); + if (i != solver.matrix_dimension_ - 2) + stream << ", "; + } + stream << "]\n"; + + stream << "D Factor (Diagonal Elements): ["; + for (int i = 0; i < solver.matrix_dimension_; ++i) { + stream << solver.main_diagonal(i); + if (i != solver.matrix_dimension_ - 1) + stream << ", "; + } + stream << "]\n"; + } + else { + // Print the matrix in its tridiagonal form if not factorized + stream << "Main Diagonal: ["; + for (int i = 0; i < solver.matrix_dimension_; ++i) { + stream << solver.main_diagonal(i); + if (i != solver.matrix_dimension_ - 1) + stream << ", "; + } + stream << "]\n"; + + stream << "Sub Diagonal: ["; + for (int i = 0; i < solver.matrix_dimension_ - 1; ++i) { + stream << solver.sub_diagonal(i); + if (i != solver.matrix_dimension_ - 2) + stream << ", "; + } + stream << "]\n"; + + if (solver.is_cyclic_) { + stream << "Cyclic Corner Element: " << solver.cyclic_corner_element() << "\n"; + } + else { + stream << "Matrix is not cyclic.\n"; + } + } + + return stream; +} + +// default construction +template +SymmetricTridiagonalSolver::SymmetricTridiagonalSolver() + : matrix_dimension_(0) + , main_diagonal_values_(nullptr) + , sub_diagonal_values_(nullptr) + , cyclic_corner_element_(0.0) + , is_cyclic_(true) +{ +} + +// copy construction +template +SymmetricTridiagonalSolver::SymmetricTridiagonalSolver(const SymmetricTridiagonalSolver& other) + : matrix_dimension_(other.matrix_dimension_) + , main_diagonal_values_(std::make_unique(matrix_dimension_)) + , sub_diagonal_values_(std::make_unique(matrix_dimension_ - 1)) + , cyclic_corner_element_(other.cyclic_corner_element_) + , is_cyclic_(other.is_cyclic_) +{ + std::copy(other.main_diagonal_values_.get(), other.main_diagonal_values_.get() + matrix_dimension_, + main_diagonal_values_.get()); + std::copy(other.sub_diagonal_values_.get(), other.sub_diagonal_values_.get() + matrix_dimension_ - 1, + sub_diagonal_values_.get()); +} + +// copy assignment +template +SymmetricTridiagonalSolver& SymmetricTridiagonalSolver::operator=(const SymmetricTridiagonalSolver& other) +{ + if (this == &other) { + // Self-assignment, no work needed + return *this; + } + // Only allocate new memory if the sizes are different + if (matrix_dimension_ != other.matrix_dimension_) { + matrix_dimension_ = other.matrix_dimension_; + main_diagonal_values_ = std::make_unique(matrix_dimension_); + sub_diagonal_values_ = std::make_unique(matrix_dimension_ - 1); + } + cyclic_corner_element_ = other.cyclic_corner_element_; + is_cyclic_ = other.is_cyclic_; + std::copy(other.main_diagonal_values_.get(), other.main_diagonal_values_.get() + matrix_dimension_, + main_diagonal_values_.get()); + std::copy(other.sub_diagonal_values_.get(), other.sub_diagonal_values_.get() + matrix_dimension_ - 1, + sub_diagonal_values_.get()); + return *this; +} + +// move construction +template +SymmetricTridiagonalSolver::SymmetricTridiagonalSolver(SymmetricTridiagonalSolver&& other) noexcept + : matrix_dimension_(other.matrix_dimension_) + , main_diagonal_values_(std::move(other.main_diagonal_values_)) + , sub_diagonal_values_(std::move(other.sub_diagonal_values_)) + , cyclic_corner_element_(other.cyclic_corner_element_) + , is_cyclic_(other.is_cyclic_) +{ + other.matrix_dimension_ = 0; + other.cyclic_corner_element_ = 0.0; + other.is_cyclic_ = true; +} + +// move assignment +template +SymmetricTridiagonalSolver& SymmetricTridiagonalSolver::operator=(SymmetricTridiagonalSolver&& other) noexcept +{ + matrix_dimension_ = other.matrix_dimension_; + main_diagonal_values_ = std::move(other.main_diagonal_values_); + sub_diagonal_values_ = std::move(other.sub_diagonal_values_); + cyclic_corner_element_ = other.cyclic_corner_element_; + is_cyclic_ = other.is_cyclic_; + other.matrix_dimension_ = 0; + other.cyclic_corner_element_ = 0.0; + other.is_cyclic_ = true; + return *this; +} + +template +SymmetricTridiagonalSolver::SymmetricTridiagonalSolver(const int matrix_dimension) + : matrix_dimension_(matrix_dimension) + , main_diagonal_values_(std::make_unique(matrix_dimension_)) + , sub_diagonal_values_(std::make_unique(matrix_dimension_ - 1)) + , cyclic_corner_element_(0.0) + , is_cyclic_(true) +{ + assert(matrix_dimension_ >= 1); +} + +template +void SymmetricTridiagonalSolver::is_cyclic(bool value) +{ + is_cyclic_ = value; +} +template +bool SymmetricTridiagonalSolver::is_cyclic() const +{ + return is_cyclic_; +} + +template +int SymmetricTridiagonalSolver::rows() const +{ + assert(this->matrix_dimension_ >= 0); + return this->matrix_dimension_; +} +template +int SymmetricTridiagonalSolver::columns() const +{ + assert(this->matrix_dimension_ >= 0); + return this->matrix_dimension_; +} + +template +const T& SymmetricTridiagonalSolver::main_diagonal(const int index) const +{ + assert(index >= 0); + assert(index < this->matrix_dimension_); + return this->main_diagonal_values_[index]; +} +template +T& SymmetricTridiagonalSolver::main_diagonal(const int index) +{ + assert(index >= 0); + assert(index < this->matrix_dimension_); + return this->main_diagonal_values_[index]; +} + +template +const T& SymmetricTridiagonalSolver::sub_diagonal(const int index) const +{ + assert(index >= 0); + assert(index < this->matrix_dimension_ - 1); + return this->sub_diagonal_values_[index]; +} +template +T& SymmetricTridiagonalSolver::sub_diagonal(const int index) +{ + assert(index >= 0); + assert(index < this->matrix_dimension_ - 1); + return this->sub_diagonal_values_[index]; +} + +template +const T& SymmetricTridiagonalSolver::cyclic_corner_element() const +{ + assert(is_cyclic_); + return this->cyclic_corner_element_; +} +template +T& SymmetricTridiagonalSolver::cyclic_corner_element() +{ + assert(is_cyclic_); + return this->cyclic_corner_element_; +} + +template +void SymmetricTridiagonalSolver::solveInPlace(T* sol_rhs, T* temp1, T* temp2) +{ + assert(matrix_dimension_ >= 2); + assert(sol_rhs != nullptr); + assert(temp1 != nullptr); + if (is_cyclic_) { + assert(temp2 != nullptr); + solveSymmetricCyclicTridiagonal(sol_rhs, temp1, temp2); + } + else { + solveSymmetricTridiagonal(sol_rhs, temp1); + } +} + +/* + * This algorithm implements the Tridiagonal Matrix Algorithm (TDMA) for solving + * symmetric tridiagonal systems of equations. The implementation is based on + * the principles outlined in the following resource: + * https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm. + */ + +template +void SymmetricTridiagonalSolver::solveSymmetricTridiagonal(T* x, T* scratch) +{ + /* ---------------------------------------------------------- */ + /* Based on Cholesky Decomposition: A = L * D * L^T + * + * This function performs Cholesky decomposition on a + * symmetric tridiagonal matrix, factorizing it into + * a lower triangular matrix (L) and a diagonal matrix (D). + * + * By storing the decomposition, this approach enhances + * efficiency for repeated solutions, as matrix factorizations + * need not be recalculated each time. + * ---------------------------------------------------------- */ + + if (!factorized_) { + for (int i = 1; i < matrix_dimension_; i++) { + assert(!equals(main_diagonal(i - 1), 0.0)); + sub_diagonal(i - 1) /= main_diagonal(i - 1); + main_diagonal(i) -= sub_diagonal(i - 1) * sub_diagonal(i - 1) * main_diagonal(i - 1); + } + factorized_ = true; + } + + for (int i = 1; i < matrix_dimension_; i++) { + x[i] -= sub_diagonal(i - 1) * x[i - 1]; + } + + for (int i = 0; i < matrix_dimension_; i++) { + assert(!equals(main_diagonal(i), 0.0)); + x[i] /= main_diagonal(i); + } + + for (int i = matrix_dimension_ - 2; i >= 0; i--) { + x[i] -= sub_diagonal(i) * x[i + 1]; + } +} + +// ------------------------- // +// Cyclic Tridiagonal Solver // +// ------------------------- // + +/* + * This algorithm implements the Tridiagonal Matrix Algorithm (TDMA) for solving + * symmetric tridiagonal systems of equations, specifically designed to handle + * cyclic boundary conditions. The implementation is based on principles outlined + * in the following resource: + * https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm. + */ + +template +void SymmetricTridiagonalSolver::solveSymmetricCyclicTridiagonal(T* x, T* u, T* scratch) +{ + /* ---------------------------------------------------------- */ + /* Cholesky Decomposition: A = L * D * L^T + * This step factorizes the tridiagonal matrix into lower + * triangular (L) and diagonal (D) matrices. While this + * approach may be slightly less stable, it can offer improved + * performance for repeated solves due to the factorization + * being stored internally. + * ---------------------------------------------------------- */ + + if (!factorized_) { + gamma_ = -main_diagonal(0); + main_diagonal(0) -= gamma_; + main_diagonal(matrix_dimension_ - 1) -= cyclic_corner_element() * cyclic_corner_element() / gamma_; + + for (int i = 1; i < matrix_dimension_; i++) { + sub_diagonal(i - 1) /= main_diagonal(i - 1); + main_diagonal(i) -= sub_diagonal(i - 1) * sub_diagonal(i - 1) * main_diagonal(i - 1); + } + factorized_ = true; + } + + u[0] = gamma_; + for (int i = 1; i < matrix_dimension_; i++) { + x[i] -= sub_diagonal(i - 1) * x[i - 1]; + if (i < matrix_dimension_ - 1) + u[i] = 0.0 - sub_diagonal(i - 1) * u[i - 1]; + else + u[i] = cyclic_corner_element() - sub_diagonal(i - 1) * u[i - 1]; + } + + for (int i = 0; i < matrix_dimension_; i++) { + x[i] /= main_diagonal(i); + u[i] /= main_diagonal(i); + } + + for (int i = matrix_dimension_ - 2; i >= 0; i--) { + x[i] -= sub_diagonal(i) * x[i + 1]; + u[i] -= sub_diagonal(i) * u[i + 1]; + } + + const double dot_product_x_v = x[0] + cyclic_corner_element() / gamma_ * x[matrix_dimension_ - 1]; + const double dot_product_u_v = u[0] + cyclic_corner_element() / gamma_ * u[matrix_dimension_ - 1]; + const double factor = dot_product_x_v / (1.0 + dot_product_u_v); + + for (int i = 0; i < matrix_dimension_; i++) { + x[i] -= factor * u[i]; + } +} \ No newline at end of file diff --git a/include/LinearAlgebra/Vector/gpu_vector.h b/include/LinearAlgebra/Vector/gpu_vector.h new file mode 100644 index 00000000..531ee874 --- /dev/null +++ b/include/LinearAlgebra/Vector/gpu_vector.h @@ -0,0 +1,172 @@ +#pragma once + +#include "vector.h" +#include "gpu_vector.h" + +#include +#include +#include + +template +class GPU_Vector +{ +public: + GPU_Vector(); + GPU_Vector(const GPU_Vector& other); + GPU_Vector(GPU_Vector&& other) noexcept; + + explicit GPU_Vector(int size); + ~GPU_Vector(); + + GPU_Vector& operator=(const GPU_Vector& other); + GPU_Vector& operator=(GPU_Vector&& other) noexcept; + + __host__ __device__ int size() const noexcept; + __host__ __device__ T* data() const noexcept; + + template + friend std::ostream& operator<<(std::ostream& stream, const GPU_Vector& gpu_vector); + +private: + int size_; + T* device_values_; + + void checkCudaError(cudaError_t error, const char* errorMessage) const; +}; + +// Copy data from host (Vector) to device (GPU_Vector) +template +void copyHostToDevice(const Vector& host_vector, GPU_Vector& gpu_vector) +{ + if (host_vector.size() != gpu_vector.size()) { + throw std::invalid_argument("Vector sizes must match for data copy."); + } + cudaMemcpy(gpu_vector.data(), host_vector.begin(), host_vector.size() * sizeof(T), cudaMemcpyHostToDevice); +} + +// Copy data from device (GPU_Vector) to host (Vector) +template +void copyDeviceToHost(const GPU_Vector& gpu_vector, Vector& host_vector) +{ + if (gpu_vector.size() != host_vector.size()) { + throw std::invalid_argument("Vector sizes must match for data copy."); + } + cudaMemcpy(host_vector.begin(), gpu_vector.data(), gpu_vector.size() * sizeof(T), cudaMemcpyDeviceToHost); +} + +// Default constructor +template +GPU_Vector::GPU_Vector() + : size_(0) + , device_values_(nullptr) +{ +} + +// Constructor with size +template +GPU_Vector::GPU_Vector(int size) + : size_(size) + , device_values_(nullptr) +{ + cudaError_t error = cudaMalloc(&device_values_, size_ * sizeof(T)); + checkCudaError(error, "Failed to allocate memory on the GPU."); +} + +// Destructor +template +GPU_Vector::~GPU_Vector() +{ + if (device_values_) { + cudaError_t error = cudaFree(device_values_); + checkCudaError(error, "Failed to free memory on the GPU."); + } +} + +// Copy constructor +template +GPU_Vector::GPU_Vector(const GPU_Vector& other) + : size_(other.size_) +{ + cudaError_t error = cudaMalloc(&device_values_, size_ * sizeof(T)); + checkCudaError(error, "Failed to allocate memory on the GPU."); + + error = cudaMemcpy(device_values_, other.device_values_, size_ * sizeof(T), cudaMemcpyDeviceToDevice); + checkCudaError(error, "Failed to copy data to the GPU."); +} + +// Move constructor +template +GPU_Vector::GPU_Vector(GPU_Vector&& other) noexcept + : size_(other.size_) + , device_values_(other.device_values_) +{ + other.size_ = 0; + other.device_values_ = nullptr; +} + +// Copy assignment operator +template +GPU_Vector& GPU_Vector::operator=(const GPU_Vector& other) +{ + if (this == &other) + return *this; + + if (size_ != other.size_) { + size_ = other.size_; + cudaFree(device_values_); + cudaError_t error = cudaMalloc(&device_values_, size_ * sizeof(T)); + checkCudaError(error, "Failed to allocate memory on the GPU."); + } + + cudaError_t error = cudaMemcpy(device_values_, other.device_values_, size_ * sizeof(T), cudaMemcpyDeviceToDevice); + checkCudaError(error, "Failed to copy data to the GPU."); + + return *this; +} + +// Move assignment operator +template +GPU_Vector& GPU_Vector::operator=(GPU_Vector&& other) noexcept +{ + if (this != &other) { + cudaFree(device_values_); + size_ = other.size_; + device_values_ = other.device_values_; + other.size_ = 0; + other.device_values_ = nullptr; + } + + return *this; +} + +// Get size of the vector +template +__host__ __device__ int GPU_Vector::size() const noexcept +{ + return size_; +} + +// Get device pointer to the data +template +__host__ __device__ T* GPU_Vector::data() const noexcept +{ + return device_values_; +} + +// Helper function to check CUDA errors +template +void GPU_Vector::checkCudaError(cudaError_t error, const char* errorMessage) const +{ + if (error != cudaSuccess) { + std::cerr << errorMessage << ": " << cudaGetErrorString(error) << std::endl; + throw std::runtime_error("CUDA error occurred."); + } +} + +template +std::ostream& operator<<(std::ostream& stream, const GPU_Vector& gpu_vector) +{ + Vector host_vector(gpu_vector.size()); + copyDeviceToHost(gpu_vector, host_vector); + return stream << host_vector; +} diff --git a/include/LinearAlgebra/Vector/gpu_vector_operations.h b/include/LinearAlgebra/Vector/gpu_vector_operations.h new file mode 100644 index 00000000..56d06de2 --- /dev/null +++ b/include/LinearAlgebra/Vector/gpu_vector_operations.h @@ -0,0 +1,538 @@ +#pragma once + +#include "gpu_vector.h" + +#include +#include +#include + +// Kernel function to assign a value to all elements of the vector +template +__global__ void assign_kernel(T* device_values, int size, T value) +{ + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx < size) { + device_values[idx] = value; + } +} + +// Host function for assigning a value to all elements of the vector +template +void assign(GPU_Vector& v, T value) +{ + int block_size = 256; + int num_blocks = (v.size() + block_size - 1) / block_size; + + assign_kernel<<>>(v.data(), v.size(), value); + cudaDeviceSynchronize(); +} + +// Kernel function to add two vectors element-wise +template +__global__ void add_kernel(T* result, const T* x, int size) +{ + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx < size) { + result[idx] += x[idx]; + } +} + +// Host function for adding two vectors element-wise +template +void add(GPU_Vector& result, const GPU_Vector& x) +{ + if (result.size() != x.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + + int block_size = 256; + int num_blocks = (result.size() + block_size - 1) / block_size; + + add_kernel<<>>(result.data(), x.data(), result.size()); + cudaDeviceSynchronize(); +} + +// Kernel function to subtract two vectors element-wise +template +__global__ void subtract_kernel(T* result, const T* x, int size) +{ + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx < size) { + result[idx] -= x[idx]; + } +} + +// Host function for subtracting two vectors element-wise +template +void subtract(GPU_Vector& result, const GPU_Vector& x) +{ + if (result.size() != x.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + + int block_size = 256; + int num_blocks = (result.size() + block_size - 1) / block_size; + + subtract_kernel<<>>(result.data(), x.data(), result.size()); + cudaDeviceSynchronize(); +} + +// Kernel function for a linear combination of two vectors +template +__global__ void linear_combination_kernel(T* x, T alpha, const T* y, T beta, int size) +{ + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx < size) { + x[idx] = alpha * x[idx] + beta * y[idx]; + } +} + +// Host function for a linear combination of two vectors +template +void linear_combination(GPU_Vector& x, const T alpha, const GPU_Vector& y, const T beta) +{ + if (x.size() != y.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + + int block_size = 256; + int num_blocks = (x.size() + block_size - 1) / block_size; + + linear_combination_kernel<<>>(x.data(), alpha, y.data(), beta, x.size()); + cudaDeviceSynchronize(); +} + +// Kernel function to multiply a vector by a scalar +template +__global__ void multiply_kernel(T* result, int size, T alpha) +{ + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx < size) { + result[idx] *= alpha; + } +} + +// Host function for multiplying a vector by a scalar +template +void multiply(GPU_Vector& v, T alpha) +{ + int block_size = 256; + int num_blocks = (v.size() + block_size - 1) / block_size; + + multiply_kernel<<>>(v.data(), v.size(), alpha); + cudaDeviceSynchronize(); +} + +// Device function to perform warp-level reduction. +template +__device__ void warpReduceAdd(volatile T* sdata, unsigned int tid) +{ + if (blockSize >= 64) + sdata[tid] += sdata[tid + 32]; + if (blockSize >= 32) + sdata[tid] += sdata[tid + 16]; + if (blockSize >= 16) + sdata[tid] += sdata[tid + 8]; + if (blockSize >= 8) + sdata[tid] += sdata[tid + 4]; + if (blockSize >= 4) + sdata[tid] += sdata[tid + 2]; + if (blockSize >= 2) + sdata[tid] += sdata[tid + 1]; +} +// Device function to perform warp-level reduction. +template +__device__ void warpReduceMax(volatile T* sdata, unsigned int tid) +{ + if (blockSize >= 64) + sdata[tid] = max(sdata[tid], sdata[tid + 32]); + if (blockSize >= 32) + sdata[tid] = max(sdata[tid], sdata[tid + 16]); + if (blockSize >= 16) + sdata[tid] = max(sdata[tid], sdata[tid + 8]); + if (blockSize >= 8) + sdata[tid] = max(sdata[tid], sdata[tid + 4]); + if (blockSize >= 4) + sdata[tid] = max(sdata[tid], sdata[tid + 2]); + if (blockSize >= 2) + sdata[tid] = max(sdata[tid], sdata[tid + 1]); +} + +template +__global__ void dot_product_kernel(const T* lhs, const T* rhs, int size, T* result) +{ + // Shared memory allocation + extern __shared__ __align__(sizeof(double)) unsigned char my_sdata[]; + T* sdata = reinterpret_cast(my_sdata); + + unsigned int tid = threadIdx.x; + unsigned int i = blockIdx.x * (blockSize * 2) + tid; + unsigned int gridSize = blockSize * 2 * gridDim.x; + + // Initialize thread-local sum + T temp = 0; + + // Grid-stride loop to accumulate partial results + while (i < size) { + temp += lhs[i] * rhs[i]; + if (i + blockSize < size) { + temp += lhs[i + blockSize] * rhs[i + blockSize]; + } + i += gridSize; + } + + // Store thread-local sum in shared memory + sdata[tid] = temp; + __syncthreads(); + + // Reduction within the block + if (blockSize >= 512) { + if (tid < 256) + sdata[tid] += sdata[tid + 256]; + __syncthreads(); + } + if (blockSize >= 256) { + if (tid < 128) + sdata[tid] += sdata[tid + 128]; + __syncthreads(); + } + if (blockSize >= 128) { + if (tid < 64) + sdata[tid] += sdata[tid + 64]; + __syncthreads(); + } + + // Final warp reduction + if (tid < 32) + warpReduceAdd(sdata, tid); + + // Accumulate the result of this block into the global result using atomicAdd + if (tid == 0) { + atomicAdd(result, sdata[0]); + } +} + +// Host function to compute the dot product of two vectors +template +T dot_product(const GPU_Vector& lhs, const GPU_Vector& rhs) +{ + if (lhs.size() != rhs.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + + int size = lhs.size(); + T* device_lhs = lhs.data(); + T* device_rhs = rhs.data(); + + const int threads_per_block = 256; + int blocks = (size + threads_per_block * 2 - 1) / (threads_per_block * 2); + + // Allocate memory for the global result on the device + T* device_result; + cudaMalloc((void**)&device_result, sizeof(T)); + + // Initialize the device result to 0 + T zero = 0; + cudaMemcpy(device_result, &zero, sizeof(T), cudaMemcpyHostToDevice); + + // Launch the kernel + size_t shared_memory_size = threads_per_block * sizeof(T); + dot_product_kernel + <<>>(device_lhs, device_rhs, size, device_result); + cudaDeviceSynchronize(); + + // Copy the final result back to the host + T result; + cudaMemcpy(&result, device_result, sizeof(T), cudaMemcpyDeviceToHost); + + // Cleanup + cudaFree(device_result); + + return result; +} + +// Kernel function for computing the L1 norm of a vector +template +__global__ void l1_norm_kernel(const T* x, int size, T* result) +{ + // Shared memory allocation + extern __shared__ __align__(sizeof(double)) unsigned char my_sdata[]; + T* sdata = reinterpret_cast(my_sdata); + + unsigned int tid = threadIdx.x; + unsigned int i = blockIdx.x * (blockSize * 2) + tid; + unsigned int gridSize = blockSize * 2 * gridDim.x; + + // Initialize thread-local sum + T temp = 0; + + // Grid-stride loop to accumulate partial absolute values + while (i < size) { + temp += abs(x[i]); + if (i + blockSize < size) { + temp += abs(x[i + blockSize]); + } + i += gridSize; + } + + // Store thread-local sum in shared memory + sdata[tid] = temp; + __syncthreads(); + + // Reduction within the block + if (blockSize >= 512) { + if (tid < 256) + sdata[tid] += sdata[tid + 256]; + __syncthreads(); + } + if (blockSize >= 256) { + if (tid < 128) + sdata[tid] += sdata[tid + 128]; + __syncthreads(); + } + if (blockSize >= 128) { + if (tid < 64) + sdata[tid] += sdata[tid + 64]; + __syncthreads(); + } + + // Final warp reduction + if (tid < 32) + warpReduceAdd(sdata, tid); + + // Accumulate the result of this block into the global result using atomicAdd + if (tid == 0) { + atomicAdd(result, sdata[0]); + } +} + +// Host function for computing the L1 norm of a vector +template +T l1_norm(const GPU_Vector& x) +{ + int size = x.size(); + T* device_x = x.data(); + + const int threads_per_block = 256; + int blocks = (size + threads_per_block * 2 - 1) / (threads_per_block * 2); + + // Allocate memory for the global result on the device + T* device_result; + cudaMalloc((void**)&device_result, sizeof(T)); + + // Initialize the device result to 0 + T zero = 0; + cudaMemcpy(device_result, &zero, sizeof(T), cudaMemcpyHostToDevice); + + // Launch the kernel + size_t shared_memory_size = threads_per_block * sizeof(T); + l1_norm_kernel + <<>>(device_x, size, device_result); + cudaDeviceSynchronize(); + + // Copy the final result back to the host + T result; + cudaMemcpy(&result, device_result, sizeof(T), cudaMemcpyDeviceToHost); + + // Cleanup + cudaFree(device_result); + + return result; +} + +// Kernel function for computing the L2 norm squared of a vector +template +__global__ void l2_norm_squared_kernel(const T* x, int size, T* result) +{ + // Shared memory allocation + extern __shared__ __align__(sizeof(double)) unsigned char my_sdata[]; + T* sdata = reinterpret_cast(my_sdata); + + unsigned int tid = threadIdx.x; + unsigned int i = blockIdx.x * (blockSize * 2) + tid; + unsigned int gridSize = blockSize * 2 * gridDim.x; + + // Initialize thread-local sum + T temp = 0; + + // Grid-stride loop to accumulate partial squares + while (i < size) { + temp += x[i] * x[i]; + if (i + blockSize < size) { + temp += x[i + blockSize] * x[i + blockSize]; + } + i += gridSize; + } + + // Store thread-local sum in shared memory + sdata[tid] = temp; + __syncthreads(); + + // Reduction within the block + if (blockSize >= 512) { + if (tid < 256) + sdata[tid] += sdata[tid + 256]; + __syncthreads(); + } + if (blockSize >= 256) { + if (tid < 128) + sdata[tid] += sdata[tid + 128]; + __syncthreads(); + } + if (blockSize >= 128) { + if (tid < 64) + sdata[tid] += sdata[tid + 64]; + __syncthreads(); + } + + // Final warp reduction + if (tid < 32) + warpReduceAdd(sdata, tid); + + // Accumulate the result of this block into the global result using atomicAdd + if (tid == 0) { + atomicAdd(result, sdata[0]); + } +} + +// Host function for computing the L2 norm squared of a vector +template +T l2_norm_squared(const GPU_Vector& x) +{ + int size = x.size(); + T* device_x = x.data(); + + const int threads_per_block = 256; + int blocks = (size + threads_per_block * 2 - 1) / (threads_per_block * 2); + + // Allocate memory for the global result on the device + T* device_result; + cudaMalloc((void**)&device_result, sizeof(T)); + + // Initialize the device result to 0 + T zero = 0; + cudaMemcpy(device_result, &zero, sizeof(T), cudaMemcpyHostToDevice); + + // Launch the kernel + size_t shared_memory_size = threads_per_block * sizeof(T); + l2_norm_squared_kernel + <<>>(device_x, size, device_result); + cudaDeviceSynchronize(); + + // Copy the final result back to the host + T result; + cudaMemcpy(&result, device_result, sizeof(T), cudaMemcpyDeviceToHost); + + // Cleanup + cudaFree(device_result); + + return result; +} + +// Host function for computing the L2 norm of a vector +template +T l2_norm(const GPU_Vector& x) +{ + T l2_squared = l2_norm_squared(x); + return sqrt(l2_squared); +} + +// Kernel function for computing the infinity norm of a vector +template +__global__ void infinity_norm_kernel(const T* x, int size, T* result) +{ + // Shared memory allocation + extern __shared__ __align__(sizeof(double)) unsigned char my_sdata[]; + T* sdata = reinterpret_cast(my_sdata); + + unsigned int tid = threadIdx.x; + unsigned int i = blockIdx.x * (blockSize * 2) + tid; + unsigned int gridSize = blockSize * 2 * gridDim.x; + + // Initialize thread-local maximum absolute value + T temp = 0; + + // Grid-stride loop to accumulate the maximum absolute value + while (i < size) { + temp = max(temp, abs(x[i])); + if (i + blockSize < size) { + temp = max(temp, abs(x[i + blockSize])); + } + i += gridSize; + } + + // Store thread-local maximum value in shared memory + sdata[tid] = temp; + __syncthreads(); + + // Reduction within the block (find the maximum within the block) + if (blockSize >= 512) { + if (tid < 256) + sdata[tid] = max(sdata[tid], sdata[tid + 256]); + __syncthreads(); + } + if (blockSize >= 256) { + if (tid < 128) + sdata[tid] = max(sdata[tid], sdata[tid + 128]); + __syncthreads(); + } + if (blockSize >= 128) { + if (tid < 64) + sdata[tid] = max(sdata[tid], sdata[tid + 64]); + __syncthreads(); + } + + // Final warp reduction + if (tid < 32) + warpReduceMax(sdata, tid); + + // Store the result of the block reduction in shared memory + if (tid == 0) { + sdata[0] = sdata[0]; // block maximum + } + + __syncthreads(); + + // Final reduction step (after kernel execution) + if (tid == 0) { + // Here we will store the final maximum back to global memory using the result pointer + T* global_result = result + blockIdx.x; + *global_result = sdata[0]; + } +} + +// Host function for computing the infinity norm of a vector +template +T infinity_norm(const GPU_Vector& x) +{ + int size = x.size(); + T* device_x = x.data(); + + const int threads_per_block = 256; + int blocks = (size + threads_per_block * 2 - 1) / (threads_per_block * 2); + + // Allocate memory for the intermediate block results on the device + T* device_block_results; + cudaMalloc((void**)&device_block_results, sizeof(T) * blocks); + + // Launch the kernel + size_t shared_memory_size = threads_per_block * sizeof(T); + infinity_norm_kernel + <<>>(device_x, size, device_block_results); + cudaDeviceSynchronize(); + + // Perform the final reduction on the host + T* host_block_results = new T[blocks]; + cudaMemcpy(host_block_results, device_block_results, sizeof(T) * blocks, cudaMemcpyDeviceToHost); + + T max_value = host_block_results[0]; + for (int i = 1; i < blocks; i++) { + max_value = max(max_value, host_block_results[i]); + } + + // Cleanup + delete[] host_block_results; + cudaFree(device_block_results); + + return max_value; +} diff --git a/include/LinearAlgebra/Vector/vector.h b/include/LinearAlgebra/Vector/vector.h new file mode 100644 index 00000000..5b02a382 --- /dev/null +++ b/include/LinearAlgebra/Vector/vector.h @@ -0,0 +1,191 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +template +class Vector +{ +public: + Vector(); + Vector(const Vector& other); + Vector(Vector&& other) noexcept; + + explicit Vector(int size); + Vector(const std::initializer_list& init); + Vector(const std::vector& init); + + Vector& operator=(const Vector& other); + Vector& operator=(Vector&& other) noexcept; + + int size() const noexcept; + + inline const T& operator[](int index) const; + inline T& operator[](int index); + + T* begin() noexcept; + T* end() noexcept; + const T* begin() const noexcept; + const T* end() const noexcept; + + template + friend std::ostream& operator<<(std::ostream& stream, const Vector& vector); + +private: + int size_; + std::unique_ptr values_; +}; + +// default construction +template +Vector::Vector() + : size_(0) + , values_(nullptr) +{ +} + +// copy construction +template +Vector::Vector(const Vector& other) + : size_(other.size_) + , values_(std::make_unique(size_)) +{ +#pragma omp parallel for if (size_ > 10'000) + for (int i = 0; i < size_; ++i) { + values_[i] = other.values_[i]; + } +} + +// copy assignment +template +Vector& Vector::operator=(const Vector& other) +{ + if (this == &other) { + /* Self-assignment, no work needed */ + return *this; + } + + /* Allocate new memory if necessary */ + if (size_ != other.size_) { + size_ = other.size_; + values_ = std::make_unique(size_); + } + +#pragma omp parallel for if (size_ > 10'000) + for (int i = 0; i < size_; ++i) { + values_[i] = other.values_[i]; + } + + return *this; +} + +// move construction +template +Vector::Vector(Vector&& other) noexcept + : size_(other.size_) + , values_(std::move(other.values_)) +{ + other.size_ = 0; +} + +// move assignment +template +Vector& Vector::operator=(Vector&& other) noexcept +{ + if (this != &other) { + size_ = other.size_; + values_ = std::move(other.values_); + other.size_ = 0; + } + return *this; +} + +// constrcutor with size +template +Vector::Vector(int size) + : size_(size) + , values_(std::make_unique(size_)) +{ +} + +// constructor with initialization +template +Vector::Vector(const std::initializer_list& init) + : size_(static_cast(init.size())) + , values_(std::make_unique(size_)) +{ + std::copy(init.begin(), init.end(), values_.get()); +} +// constructor with std::vector initialization +template +Vector::Vector(const std::vector& init) + : size_(static_cast(init.size())) + , values_(std::make_unique(size_)) +{ + assert(!init.empty()); + std::copy(init.begin(), init.end(), values_.get()); +} + +// getter [] +template +inline const T& Vector::operator[](int index) const +{ + assert(index >= 0); + assert(index < size_); + return values_[index]; +} +// setter [] +template +inline T& Vector::operator[](int index) +{ + assert(index >= 0); + assert(index < size_); + return values_[index]; +} +// get vector's size +template +int Vector::size() const noexcept +{ + return size_; +} + +template +T* Vector::begin() noexcept +{ + return values_.get(); +} +template +T* Vector::end() noexcept +{ + return values_.get() + size_; +} + +template +const T* Vector::begin() const noexcept +{ + return values_.get(); +} + +template +const T* Vector::end() const noexcept +{ + return values_.get() + size_; +} + +template +std::ostream& operator<<(std::ostream& stream, const Vector& vector) +{ + stream << "["; + for (int i = 0; i < vector.size(); ++i) { + stream << vector[i]; + if (i != vector.size() - 1) + stream << ", "; + } + stream << "]\n"; + return stream; +} diff --git a/include/LinearAlgebra/Vector/vector_operations.h b/include/LinearAlgebra/Vector/vector_operations.h new file mode 100644 index 00000000..b1aef0d5 --- /dev/null +++ b/include/LinearAlgebra/Vector/vector_operations.h @@ -0,0 +1,140 @@ +#pragma once + +#include "vector.h" + +#include +#include +#include + +template +void assign(Vector& lhs, const T& value) +{ + std::size_t n = lhs.size(); +#pragma omp parallel for if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + lhs[i] = value; + } +} + +template +void add(Vector& result, const Vector& x) +{ + if (result.size() != x.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + std::size_t n = result.size(); +#pragma omp parallel for if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + result[i] += x[i]; + } +} + +template +void add(Vector& result, const Vector& x, const int m) +{ + if (result.size() != x.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + std::size_t n = result.size(); +#pragma omp parallel for if (n > m) + for (std::size_t i = 0; i < n; ++i) { + result[i] += x[i]; + } +} + +template +void subtract(Vector& result, const Vector& x) +{ + if (result.size() != x.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + std::size_t n = result.size(); +#pragma omp parallel for if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + result[i] -= x[i]; + } +} + +template +void linear_combination(Vector& x, const T& alpha, const Vector& y, const T& beta) +{ + if (x.size() != y.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + std::size_t n = x.size(); +#pragma omp parallel for if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + x[i] = alpha * x[i] + beta * y[i]; + } +} + +template +void multiply(Vector& x, const T& alpha) +{ + std::size_t n = x.size(); +#pragma omp parallel for if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + x[i] *= alpha; + } +} + +template +T dot_product(const Vector& lhs, const Vector& rhs) +{ + if (lhs.size() != rhs.size()) { + throw std::invalid_argument("Vectors must be of the same size."); + } + + T result = 0.0; + std::size_t n = lhs.size(); +#pragma omp parallel for reduction(+ : result) if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + result += lhs[i] * rhs[i]; + } + return result; +} + +template +T l1_norm(const Vector& x) +{ + T result = 0.0; + std::size_t n = x.size(); +#pragma omp parallel for reduction(+ : result) if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + result += std::abs(x[i]); + } + return result; +} + +template +T l2_norm_squared(const Vector& x) +{ + T result = 0.0; + std::size_t n = x.size(); +#pragma omp parallel for reduction(+ : result) if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + result += x[i] * x[i]; + } + return result; +} + +template +T l2_norm(const Vector& x) +{ + return sqrt(l2_norm_squared(x)); +} + +template +T infinity_norm(const Vector& x) +{ + T result = 0.0; + std::size_t n = x.size(); +#pragma omp parallel for reduction(max : result) if (n > 10'000) + for (std::size_t i = 0; i < n; ++i) { + T abs_value = std::abs(x[i]); + if (abs_value > result) { + result = abs_value; + } + } + return result; +} diff --git a/include/PolarGrid/polargrid.h b/include/PolarGrid/polargrid.h new file mode 100644 index 00000000..16aaef5e --- /dev/null +++ b/include/PolarGrid/polargrid.h @@ -0,0 +1,135 @@ +#pragma once + +#include +#include +#include +#include + +class PolarGrid +{ +public: + /* Constructor to initialize grid using vectors of radii and angles. */ + PolarGrid(const std::vector& radii, const std::vector& angles, + std::optional splitting_radius = std::nullopt); + + /* Constructor to initialize grid using parameters from GMGPolar. */ + explicit PolarGrid(const double& R0, const double& Rmax, const int nr_exp, const int ntheta_exp, + const double& refinement_radius, const int anisotropic_factor, const int divideBy2, + std::optional splitting_radius = std::nullopt); + + PolarGrid(const PolarGrid& other); + PolarGrid(PolarGrid&& other) noexcept; + + PolarGrid& operator=(const PolarGrid& other); + PolarGrid& operator=(PolarGrid&& other) noexcept; + + ~PolarGrid(); + + __host__ __device__ __forceinline__ int wrapThetaIndex(const int unwrapped_theta_index) const; + __host__ __device__ __forceinline__ int index(const int r_index, const int unwrapped_theta_index) const; + __host__ __device__ __forceinline__ void multiIndex(const int node_index, int& r_index, int& theta_index) const; + + // Get the number of grid nodes + __host__ __device__ __forceinline__ int numberOfNodes() const; + // Get the number of grid points in radial direction + __host__ __device__ __forceinline__ int nr() const; + // Get the number of angular divisions + __host__ __device__ __forceinline__ int ntheta() const; + + // Get the radius at a specific radial index + __host__ __device__ __forceinline__ double radius(const int r_index) const; + // Get the angle at a specific angular index + __host__ __device__ __forceinline__ double theta(const int theta_index) const; + + // Get the radial distance to the next consecutive radial node at a specified radial index. + __host__ __device__ __forceinline__ double radialSpacing(const int r_index) const; + // Get the angular distance to the next consecutive angular node at a specified unwrapped angular index. + __host__ __device__ __forceinline__ double angularSpacing(const int unwrapped_theta_index) const; + + // Circle/radial smoother division + // Get the radius which splits the grid into circular and radial smoothing + __host__ __device__ __forceinline__ double smootherSplittingRadius() const; + // Get the number of circles in the circular smoother. + __host__ __device__ __forceinline__ int numberSmootherCircles() const; + // Get the length of the radial smoother lines. + __host__ __device__ __forceinline__ int lengthSmootherRadial() const; + // Get the number of nodes in circular smoother. + __host__ __device__ __forceinline__ int numberCircularSmootherNodes() const; + // Get the number of nodes in radial smoother. + __host__ __device__ __forceinline__ int numberRadialSmootherNodes() const; + +private: + // We will use the convention: + // radii = [R0, ..., R], angles = [0, ..., 2*pi] + // Note that ntheta will be one less than the size of angles since 0 and 2pi are the same point. + int nr_; // number of nodes in radial direction + int ntheta_; // number of (unique) nodes in angular direction + bool is_ntheta_PowerOfTwo_; + std::vector radii_; // Vector of radial coordiantes + std::vector angles_; // Vector of angular coordinates + // GPU memory + double* d_radii_; + double* d_angles_; + + // radial_spacings_ contains the distances between each consecutive radii division. + // radial_spacings_ = [r_{1}-r_{0}, ..., r_{N}-r_{N-1}]. + std::vector radial_spacings_; // size(radial_spacings_) = nr() - 1 + // angular_spacings_ contains the angles between each consecutive theta division. + // Since we have a periodic boundary in theta direction, + // we have to make sure the index wraps around correctly when accessing it. + // Here theta_0 = 0.0 and theta_N = 2*pi refer to the same point. + // angular_spacings_ = [theta_{1}-theta_{0}, ..., theta_{N}-theta_{N-1}]. + std::vector angular_spacings_; // size(angular_spacings_) = ntheta() + // GPU memory + double* d_radial_spacings_; + double* d_angular_spacings_; + + // Circle/radial smoother division + double smoother_splitting_radius_; // Radius at which the grid is split into circular and radial smoothing + int number_smoother_circles_; // Number of smoother circles in the grid + int length_smoother_radial_; // Length of the radial smoother lines. + int number_circular_smoother_nodes_; // Number of nodes in the circular smoother + int number_radial_smoother_nodes_; // Number of nodes in the radial smoother + + // ------------------------ // + // Private Helper Functions // + // ------------------------ // + + // Check parameter validity + void checkParameters(const std::vector& radii, const std::vector& angles) const; + // Initialize radial_spacings_, angular_spacings_ + void initializeDistances(); + + // Initializes line splitting parameters for Circle/radial indexing. + // splitting_radius: The radius value used for dividing the smoother into a circular and radial section. + // If std::nullopt, automatic line-splitting is enabled. + // If the splitting radius is less than R0, only Radial indexing is used. + // If the splitting radius is greater than or equal to R, only Circular indexing is used. + void initializeLineSplitting(std::optional splitting_radius); + + // Construct radial divisions for grid generation. + void constructRadialDivisions(const double& R0, const double& R, const int nr_exp, const double& refinement_radius, + const int anisotropic_factor); + // Construct angular divisions for grid generation. + void constructAngularDivisions(const int ntheta_exp, const int nr); + + // Refine the grid by dividing radial and angular divisions by 2. + void refineGrid(const int divideBy2); + std::vector divideVector(const std::vector& vec, const int divideBy2) const; + + // Help constrcut radii_ when an anisotropic radial division is requested + // Implementation in src/PolarGrid/anisotropic_division.cpp + void RadialAnisotropicDivision(std::vector& r_temp, const double& R0, const double& R, const int nr_exp, + const double& refinement_radius, const int anisotropic_factor) const; + + void allocateDeviceMemory(); + void copyDataToDevice(); + void freeDeviceMemory(); +}; + +#include "polargrid.inl" + +// ---------------------------------------------------- // +// Generates a coarser PolarGrid from a finer PolarGrid // +// ---------------------------------------------------- // +PolarGrid coarseningGrid(const PolarGrid& grid); diff --git a/include/PolarGrid/polargrid.inl b/include/PolarGrid/polargrid.inl new file mode 100644 index 00000000..b4e7bd7e --- /dev/null +++ b/include/PolarGrid/polargrid.inl @@ -0,0 +1,118 @@ +#pragma once + +#include "polargrid.h" + +__host__ __device__ __forceinline__ int PolarGrid::wrapThetaIndex(const int unwrapped_theta_index) const +{ + // unwrapped_theta_index may be negative or larger than ntheta() to allow for periodicity. + // If ntheta = 2^k, we can use the optimization idx & (ntheta - 1). + if (is_ntheta_PowerOfTwo_) { + return unwrapped_theta_index & (ntheta() - 1); + } + else { + int wrapped_index = unwrapped_theta_index % ntheta(); + // Adjust for negative indices + if (wrapped_index < 0) { + wrapped_index += ntheta(); + } + return wrapped_index; + } +} + +__host__ __device__ __forceinline__ int PolarGrid::index(const int r_index, const int unwrapped_theta_index) const +{ + assert(0 <= r_index && r_index < nr()); + const int theta_index = wrapThetaIndex(unwrapped_theta_index); + assert(0 <= theta_index && theta_index < ntheta()); + return r_index < numberSmootherCircles() ? theta_index + ntheta() * r_index + : numberCircularSmootherNodes() + r_index - numberSmootherCircles() + + lengthSmootherRadial() * theta_index; +} +__host__ __device__ __forceinline__ void PolarGrid::multiIndex(const int node_index, int& r_index, + int& theta_index) const +{ + assert(0 <= node_index && node_index < numberOfNodes()); + if (node_index < numberCircularSmootherNodes()) { + r_index = node_index / ntheta(); + theta_index = is_ntheta_PowerOfTwo_ ? node_index & (ntheta() - 1) : node_index % ntheta(); + } + else { + theta_index = (node_index - numberCircularSmootherNodes()) / lengthSmootherRadial(); + r_index = numberSmootherCircles() + (node_index - numberCircularSmootherNodes()) % lengthSmootherRadial(); + } +} + +__host__ __device__ __forceinline__ int PolarGrid::numberOfNodes() const +{ + return nr() * ntheta(); +} +__host__ __device__ __forceinline__ int PolarGrid::nr() const +{ + return nr_; +} +__host__ __device__ __forceinline__ int PolarGrid::ntheta() const +{ + return ntheta_; +} + +__host__ __device__ __forceinline__ double PolarGrid::radius(const int r_index) const +{ + assert(r_index >= 0 && r_index < nr()); +#ifdef __CUDA_ARCH__ + return d_radii_[r_index]; +#else + return radii_[r_index]; +#endif +} +__host__ __device__ __forceinline__ double PolarGrid::theta(const int theta_index) const +{ + assert(theta_index >= 0 && theta_index < ntheta() + 1); +#ifdef __CUDA_ARCH__ + return d_angles_[theta_index]; +#else + return angles_[theta_index]; +#endif +} + +__host__ __device__ __forceinline__ double PolarGrid::radialSpacing(const int r_index) const +{ + assert(r_index >= 0 && r_index < nr() - 1); +#ifdef __CUDA_ARCH__ + return d_radial_spacings_[r_index]; +#else + return radial_spacings_[r_index]; +#endif +} +__host__ __device__ __forceinline__ double PolarGrid::angularSpacing(const int unwrapped_theta_index) const +{ + // unwrapped_theta_index may be negative or larger than ntheta() to allow for periodicity. + const int theta_index = wrapThetaIndex(unwrapped_theta_index); + assert(theta_index >= 0 && theta_index < ntheta()); +#ifdef __CUDA_ARCH__ + return d_angular_spacings_[theta_index]; +#else + return angular_spacings_[theta_index]; +#endif +} + +__host__ __device__ __forceinline__ double PolarGrid::smootherSplittingRadius() const +{ + return smoother_splitting_radius_; +} + +__host__ __device__ __forceinline__ int PolarGrid::numberSmootherCircles() const +{ + return number_smoother_circles_; +} +__host__ __device__ __forceinline__ int PolarGrid::lengthSmootherRadial() const +{ + return length_smoother_radial_; +} +__host__ __device__ __forceinline__ int PolarGrid::numberCircularSmootherNodes() const +{ + return number_circular_smoother_nodes_; +} +__host__ __device__ __forceinline__ int PolarGrid::numberRadialSmootherNodes() const +{ + return number_radial_smoother_nodes_; +} diff --git a/include/Residual/ResidualTakeCPU/residual.h b/include/Residual/ResidualTakeCPU/residual.h new file mode 100644 index 00000000..7f5232f2 --- /dev/null +++ b/include/Residual/ResidualTakeCPU/residual.h @@ -0,0 +1,43 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include + +#include "../../PolarGrid/polargrid.h" + +#include "../../InputFunctions/boundaryConditions.h" +#include "../../InputFunctions/densityProfileCoefficients.h" +#include "../../InputFunctions/domainGeometry.h" +#include "../../InputFunctions/sourceTerm.h" +#include "../../Level/level.h" +#include "../../LinearAlgebra/Vector/vector.h" +#include "../../LinearAlgebra/Vector/vector_operations.h" +#include "../../common/constants.h" + +class ResidualTakeCPU +{ +public: + explicit ResidualTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + ~ResidualTakeCPU() = default; + + void computeResidual(Vector& result, const Vector& rhs, const Vector& x) const; + +private: + /* ------------------- */ + /* Constructor members */ + const PolarGrid& grid_; + const LevelCache& level_cache_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + void applyCircleSection(const int i_r, Vector& result, const Vector& rhs, + const Vector& x) const; + void applyRadialSection(const int i_theta, Vector& result, const Vector& rhs, + const Vector& x) const; +}; diff --git a/include/Residual/ResidualTakeGPU/residual.h b/include/Residual/ResidualTakeGPU/residual.h new file mode 100644 index 00000000..a5303edd --- /dev/null +++ b/include/Residual/ResidualTakeGPU/residual.h @@ -0,0 +1,38 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include + +#include "../../PolarGrid/polargrid.h" + +#include "../../InputFunctions/boundaryConditions.h" +#include "../../InputFunctions/densityProfileCoefficients.h" +#include "../../InputFunctions/domainGeometry.h" +#include "../../InputFunctions/sourceTerm.h" +#include "../../Level/level.h" +#include "../../LinearAlgebra/Vector/gpu_vector.h" +#include "../../common/constants.h" + +class ResidualTakeGPU +{ +public: + explicit ResidualTakeGPU(const Level& level, + const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior); + ~ResidualTakeGPU() = default; + + void computeResidual(GPU_Vector& result, const GPU_Vector& rhs, const GPU_Vector& x) const; + +private: + /* ------------------- */ + /* Constructor members */ + const Level& level_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; +}; \ No newline at end of file diff --git a/include/Smoother/SmootherTakeCPU/smoother.h b/include/Smoother/SmootherTakeCPU/smoother.h new file mode 100644 index 00000000..3fa8f469 --- /dev/null +++ b/include/Smoother/SmootherTakeCPU/smoother.h @@ -0,0 +1,87 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include + +#include "dmumps_c.h" +#include "mpi.h" + +#include "../../PolarGrid/polargrid.h" +#include "../../InputFunctions/boundaryConditions.h" +#include "../../InputFunctions/densityProfileCoefficients.h" +#include "../../InputFunctions/domainGeometry.h" +#include "../../InputFunctions/sourceTerm.h" +#include "../../Level/level.h" +#include "../../LinearAlgebra/Vector/vector.h" +#include "../../LinearAlgebra/Vector/vector_operations.h" +#include "../../LinearAlgebra/Matrix/matrix.h" +#include "../../LinearAlgebra/Solvers/symmetric_tridiagonal_solver.h" +#include "../../common/constants.h" +#include "../../Stencil/stencil.h" + +class SmootherTakeCPU +{ +public: + explicit SmootherTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + ~SmootherTakeCPU(); + + void smoothingInPlace(Vector& x, const Vector& rhs, Vector& temp); + +private: + /* ------------------- */ + /* Constructor members */ + const PolarGrid& grid_; + const LevelCache& level_cache_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + SparseMatrix inner_boundary_circle_matrix_; + DMUMPS_STRUC_C inner_boundary_mumps_solver_; + std::vector> circle_tridiagonal_solver_; + std::vector> radial_tridiagonal_solver_; + + const Stencil stencil_DB_ = {-1, -1, -1, -1, 0, -1, -1, -1, -1}; + + /* Circle Stencils */ + + const Stencil circle_stencil_interior_ = {-1, 2, -1, -1, 0, -1, -1, 1, -1}; + + const Stencil circle_stencil_across_origin_ = {-1, 3, -1, 1, 0, -1, -1, 2, -1}; + + /* Radial Stencils */ + + const Stencil radial_stencil_interior_ = {-1, -1, -1, 1, 0, 2, -1, -1, -1}; + + const Stencil radial_stencil_next_outer_DB_ = {-1, -1, -1, 1, 0, -1, -1, -1, -1}; + + const Stencil radial_stencil_next_circular_smoothing_ = {-1, -1, -1, -1, 0, 1, -1, -1, -1}; + + const Stencil& getStencil(int i_r) const; + int getNonZeroCountCircleAsc(const int i_r) const; + int getNonZeroCountRadialAsc(const int i_theta) const; + + int getCircleAscIndex(const int i_r, const int i_theta) const; + int getRadialAscIndex(const int i_r, const int i_theta) const; + + void buildAscMatrices(); + void buildAscCircleSection(const int i_r); + void buildAscRadialSection(const int i_theta); + + void applyAscOrthoCircleSection(const int i_r, const SmootherColor smoother_color, const Vector& x, + const Vector& rhs, Vector& temp); + void applyAscOrthoRadialSection(const int i_theta, const SmootherColor smoother_color, const Vector& x, + const Vector& rhs, Vector& temp); + + void solveCircleSection(const int i_r, Vector& x, Vector& temp, Vector& solver_storage_1, + Vector& solver_storage_2); + void solveRadialSection(const int i_theta, Vector& x, Vector& temp, Vector& solver_storage); + + void initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, const SparseMatrix& solver_matrix); + void finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver); +}; \ No newline at end of file diff --git a/include/Smoother/SmootherTakeGPU/smoother.h b/include/Smoother/SmootherTakeGPU/smoother.h new file mode 100644 index 00000000..bc93f5da --- /dev/null +++ b/include/Smoother/SmootherTakeGPU/smoother.h @@ -0,0 +1,105 @@ +#pragma once + +class LevelCache; +class Level; + +#include +#include +#include +#include +#include +#include +#include + + +#include "../../PolarGrid/polargrid.h" +#include "../../InputFunctions/boundaryConditions.h" +#include "../../InputFunctions/densityProfileCoefficients.h" +#include "../../InputFunctions/domainGeometry.h" +#include "../../InputFunctions/sourceTerm.h" +#include "../../Level/level.h" +#include "../../LinearAlgebra/Vector/gpu_vector.h" +#include "../../common/constants.h" + +#include "../../LinearAlgebra/Matrix/matrix.h" +#include "dmumps_c.h" +#include "mpi.h" + +class SmootherTakeGPU +{ +public: + explicit SmootherTakeGPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior); + ~SmootherTakeGPU(); + + void smoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + +private: + /* ------------------- */ + /* Constructor members */ + const Level& level_; + const DomainGeometry& domain_geometry_; + const DensityProfileCoefficients& density_profile_coefficients_; + const bool DirBC_Interior_; + + /* Cuda Solvers */ + cusparseHandle_t sparse_handle_; + cusolverSpHandle_t solver_handle_; + cusparseMatDescr_t descrA_; + + /* Circle Tridiagonal Matrices */ + double* circle_main_diagonals_; + double* circle_lower_diagonals_; + double* circle_upper_diagonals_; + double* sherman_morrison_gammas_; + double* factor_; + /* Radial Tridiagonal Matrices */ + double* radial_main_diagonals_; + double* radial_lower_diagonals_; + double* radial_upper_diagonals_; + /* Tridiagonal Solver Buffer */ + void* pBuffer_; + /* Inner Boundary CSR Matrix */ + double* csrValA_; + int *csrRowPtrA_; + int *csrColIndA_; + /* Inner Boundary Mumps COO Matrix */ + std::unique_ptr inner_boundary_matrix_row_indices_; + std::unique_ptr inner_boundary_matrix_column_indices_; + std::unique_ptr inner_boundary_matrix_values_; + DMUMPS_STRUC_C inner_boundary_mumps_solver_; + int* d_inner_boundary_matrix_row_indices_; + int* d_inner_boundary_matrix_column_indices_; + double* d_inner_boundary_matrix_values_; + + /* Build Smoother Matrices we have allocated. */ + void buildAscMatrices(); + + void initializeMumps(); + void finalizeMumpsSolver(); + + /* The cyclic tridiagonal Matrices need to be adjusted to a system of a non-cyclic tridiagonal matrices. */ + void adjustAscCircle_ShermanMorrison(); + + /* temp is needed to prepare for the Sherman-Morrison formula. */ + void applyAscOrtho_BlackCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry); + void applyAscOrtho_WhiteCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry); + + void applyAscOrtho_BlackRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry); + void applyAscOrtho_WhiteRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry); + + + void solveAsc_BlackCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + void solveAsc_WhiteCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp); + + void solveAsc_BlackRadial(GPU_Vector& x, const GPU_Vector& rhs); + void solveAsc_WhiteRadial(GPU_Vector& x, const GPU_Vector& rhs); +}; \ No newline at end of file diff --git a/include/Stencil/stencil.h b/include/Stencil/stencil.h new file mode 100644 index 00000000..ec4361d9 --- /dev/null +++ b/include/Stencil/stencil.h @@ -0,0 +1,28 @@ +#pragma once + +#include +#include + +enum class StencilType +{ + TopLeft, + Top, + TopRight, + Left, + Center, + Right, + BottomLeft, + Bottom, + BottomRight, +}; + +class Stencil +{ +public: + Stencil(std::initializer_list init); + int operator[](StencilType type) const; + +private: + std::array values_; + int stencil_size_; +}; diff --git a/include/cmdline.h b/include/Utilities/cmdline.h similarity index 99% rename from include/cmdline.h rename to include/Utilities/cmdline.h index 96812025..20337e04 100644 --- a/include/cmdline.h +++ b/include/Utilities/cmdline.h @@ -894,4 +894,4 @@ class parser std::vector errors; }; -} // namespace cmdline +} // namespace cmdline \ No newline at end of file diff --git a/include/common/constants.h b/include/common/constants.h new file mode 100644 index 00000000..fcfb2325 --- /dev/null +++ b/include/common/constants.h @@ -0,0 +1,76 @@ +#pragma once + +/* ---------------------------------- */ +/* GMGPolar - Enumeration Definitions */ +/* ---------------------------------- */ + +/* Multigrid Cycle Types */ +enum class MultigridCycleType +{ + V_CYCLE = 0, + W_CYCLE = 1, + F_CYCLE = 2 +}; + +/* Residual Norm Type */ +enum class ResidualNormType +{ + EUCLIDEAN = 0, // Corresponds to the L2 norm + WEIGHTED_EUCLIDEAN = 1, // A weighted version of the L2 norm + INFINITY_NORM = 2 // Corresponds to the L∞ norm +}; + +enum class ExtrapolationType +{ + NONE = 0, + IMPLICIT_EXTRAPOLATION = 1, + IMPLICIT_FULL_GRID_SMOOTHING = 2, + COMBINED = 3, +}; + +/* Smoother Colors */ +enum class SmootherColor { + Black = 0, + White = 1, +}; + +enum class ProcessingType { + CPU = 0, + CPU_HYBRID = 1, + GPU = 2, +}; + +/* ---------------------------- */ +/* Mumps - Constant Definitions */ +/* ---------------------------- */ + +/* Mumps macro s.t. indices match documentation */ +#define ICNTL(I) icntl[(I)-1] +#define CNTL(I) cntl[(I)-1] +#define INFOG(I) infog[(I)-1] + +#define USE_COMM_WORLD -987654 +#define PAR_NOT_PARALLEL 0 +#define PAR_PARALLEL 1 + +#define JOB_INIT -1 +#define JOB_END -2 +#define JOB_REMOVE_SAVED_DATA -3 +#define JOB_FREE_INTERNAL_DATA -4 +#define JOB_SUPPRESS_OOC_FILES -200 + +#define JOB_ANALYSIS_PHASE 1 +#define JOB_FACTORIZATION_PHASE 2 +#define JOB_COMPUTE_SOLUTION 3 +#define JOB_ANALYSIS_AND_FACTORIZATION 4 +#define JOB_FACTORIZATION_AND_SOLUTION 5 +#define JOB_ANALYSIS_FACTORIZATION_SOLUTION 6 +#define JOB_SAVE_INTERNAL_DATA 7 +#define JOB_RESTORE_INTERNAL_DATA 8 +#define JOB_DISTRIBUTE_RHS 9 + +#define SYM_UNSYMMETRIC 0 +#define SYM_POSITIVE_DEFINITE 1 +#define SYM_GENERAL_SYMMETRIC 2 + +//#define GEOM_SHAFRANOV \ No newline at end of file diff --git a/include/common/equals.h b/include/common/equals.h new file mode 100644 index 00000000..24fe37e9 --- /dev/null +++ b/include/common/equals.h @@ -0,0 +1,12 @@ +#pragma once + +#include +#include +#include + +template +inline std::enable_if_t, bool> equals(T lhs, T rhs) +{ + return std::abs(lhs - rhs) <= + (1e3 * std::numeric_limits::epsilon()) * std::max(1.0, std::max(std::abs(lhs), std::abs(rhs))); +} \ No newline at end of file diff --git a/include/config.h b/include/config.h deleted file mode 100644 index ea43a7d3..00000000 --- a/include/config.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Martin J. Kühn -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/** - * Configuration of GMGPolar library. - */ - -#ifndef GMGPOLAR_CONFIG_H -#define GMGPOLAR_CONFIG_H - -#include "config_internal.h" - -#endif // GMGPOLAR_CONFIG_H diff --git a/include/config_internal.h b/include/config_internal.h deleted file mode 100644 index 38e6a59d..00000000 --- a/include/config_internal.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Martin J. Kühn -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/** - * Configured by cmake. - */ - -#ifndef GMGPOLAR_CONFIG_INTERNAL_H -#define GMGPOLAR_CONFIG_INTERNAL_H - -#define GMGPOLAR_USE_MUMPS - -#endif // GMGPOLAR_CONFIG_INTERNAL_H diff --git a/include/config_internal.h.in b/include/config_internal.h.in deleted file mode 100644 index 3bf582e8..00000000 --- a/include/config_internal.h.in +++ /dev/null @@ -1,33 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Martin J. Kühn -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/** - * Configured by cmake. - */ - -#ifndef GMGPOLAR_CONFIG_INTERNAL_H -#define GMGPOLAR_CONFIG_INTERNAL_H - -#cmakedefine GMGPOLAR_USE_MUMPS -#cmakedefine GMGPOLAR_USE_LIKWID - -#endif // GMGPOLAR_CONFIG_INTERNAL_H diff --git a/include/constants.h b/include/constants.h deleted file mode 100644 index 8083cce2..00000000 --- a/include/constants.h +++ /dev/null @@ -1,382 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file constants.h - * \brief Header defining constants and enumerations of Controls/Info - * \author M. Kuehn, C. Kruse, P. Leleux - * \version 0.0 - */ -#ifndef CONSTANTS_HXX_ -#define CONSTANTS_HXX_ - -#include - -/// Defines the control parameters indices in a safe way -namespace Param -{ -//! To be used with the gyro::icntl vector. -enum icontrols -{ - /*! \brief (WIP) Optimized code - * - * 0: old version (non-optimized version for validation in the beginning, not maintained for some time; do not use) - * 1: new version (default) - */ - optimized, - /*! \brief Verbose level - * - * Defines the level of verbose outputs. For higher levels all output from lower levels is always given. - * 0: No output - * 1: Minimal convergence output. - * 2: Minimal problem setting details, iteration output and timings. - * 3: Print all parameters and more detailed problem settings. - * 4: Information on called functions. - * 5: Prints information on multigrid levels. - * 6: Print out all kind of variable values. - */ - verbose, - /*! \brief openmp paralellization - * - * Defines the number of threads we use - */ - openmp, - /*! \brief Matrix-free implementation - * - * Defines if a matrix free implementation is used - * (A is applied) or not (A is assembled) - */ - matrix_free, - /*! \brief Check the implementation - * - * Compare the results of the current implementation with - * structures extracted from the MATLAB implementation. - * Only the setup is run, no multigrid cycle. - */ - debug, - /*! \brief Number of nodes (exponents) - * - * Defines the number of nodes in each direction: - * - nr = 2^(nr_exp-1) - * - ntheta = 2^(ceil(log2(nr))-1) - * - * More detailed: - * - * First, the number of nodes in r-direction is computed as follows: - * without any ansisotropy (fac_ani=0), we have nr=2^(nr_exp - 1) equally distributed nodes; - * with anisotropy: we fisrt create nr=2^(nr_exp) - 1^(fac_ani) equally distributed nodes, and then, the grid is refined fac_ani-times; - * Lastly, regardless of using any anisotropy or not, we refine again by splitting all intervals at the midpoint - * (to obtain a uniform grid refinement between the two finest levels for a successful extrapolation). - * - * Second, the number of nodes in theta-direction is computed as follows: - * ntheta= 2^(ceil(log_2(nr))) - * - */ - nr_exp, - /*! \brief The parameter ntheta_exp is not used in our simulations. We generally define the number of theta intervals similar to the number of intervals in r. - */ - ntheta_exp, - /*! \brief Anisotropic discretization in 'edge' region for r - * - * Defines if we use anisotropic discretization in r-direction - * - * Possible values are: - * - -1: input list of r and theta coordinates - * - 0: no anisotropy - * - >0: anisotropy (automatic) (number of refinements) - * - */ - fac_ani, - /*! \brief Not used - * (we never have an ansisotropy in theta-direction, so the value is always 0/false) - */ - theta_aniso, - /*! \brief Smoothing steps - * - * Number of pre- (v1) and post- (v2) -smoothing steps - */ - v1, - v2, - /*! \brief Type of MG cycle - * - * Type of multigrid cycle: - * - 1: V-cycle (default setting) - * - 2: W-cycle - */ - cycle, - /*! \brief Defines the form of the considered cross-section: Circular or stretched geometry. If `mod_pk=0`, we consider a circular geometry. If `mod_pk>1`, it always goes with a particular choice of `kappa_eps` and `delta_e` to describe realistic Tokamak cross sections. - - For more details, we refer to: - - Bouzat, N., Bressan, C., Grandgirard, V., Latu, G., Mehrenberger, M.: Targeting Realistic Geometry in Tokamak Code Gysela. (2018) - - Zoni, E., Güçlü, Y.: Solving hyperbolic-elliptic problems on singular mapped disk-like -domains with the method of characteristics and spline finite elements. (2019) - - Bourne et al.: Solver comparison for Poisson-like equations on tokamak geometries. (2023) - * - * Defines the shape of the geometry: - * - 0: kappa_eps = delta_e = 0 (circular geometry) - * - 1: kappa_eps=0.3, delta_e=0.2 (stretched and deformed circle, also denoted Shafranov geometry) - * - 2: kappa_eps=0.3, delta_e=1.4 (stretched and deformed circle, also denoted Czarny geometry) - */ - mod_pk, - /*! \brief Compute rho - * - * Defines if we compute rho, i.e. the reduction factor for the - * residual through the iteration. - */ - compute_rho, - /*! \brief Maximum level for MG - * - * Defines the maximum level used for the multigrid scheme: - * -1: limit such that there are 3 points in r, and 4 points in theta on the finest grid. - */ - level, - /*! \brief Plot or not - * - * Plot or not - */ - plotit, - /*! \brief Compare with exact solution - * - * Compute the the exact solution without MG for comparison - * (ok with manufactured solutions). - */ - solveit, - /*! \brief Maximum iterations for MG - * - * Maximum number of iterations for the multigrid scheme. - */ - maxiter, - /*! \brief Periodic boundary condition in theta - * - * Periodic boundary condition in theta. The other possibility was - * Dirichlet BC but we do not consider this anymore. - */ - periodic, - /*! \brief Specifies if theta has a periodicity condition - * - * Specifies if theta has a periodicity condition - */ - origin_NOT_coarse, - /*! \brief Smoother (3 and 13 only) - * - * Defines the smoother we use: - * - 0: PointRB (not implemented) - * - 1: CircZGS (not implemented) - * - 2: RadZGS (not implemented) - * - 3: AltZGS (coupled circle-radial version) (default setting) - * - 13: Decoupled AltZGS (C-R: BJ, W-B: GS) (faster to execute but leads to more iterations) - * - 4: optimizedAltZGS (not implemented) - * - 5: MixZGS (not implemented) - */ - smoother, - /*! \brief Discretization scheme (3 only) - * - * Defines the discretization scheme we use - * 0: FD (useless) - * 1: 5p (not implemented) - * 2: 7p (not implemented) - * 3: 9p - * 4: P1 (not implemented) - * 5: P1nonst (not implemented) - * 6: P2 (not implemented) - */ - discr, - /*! \brief Extrapolation - * - * 0: no extrapolation - * 1: implicit extrapolation with adapted smoothing on finest grid (default setting) - * 2: experimental version of implicit extrapolation with full grid smoothing (residual stopping criterion not functional, use with care) - * 3: extrap_integer (FE only) - * 4: no_extrap_integr (FE only) - */ - extrapolation, - /*! \brief Boundary conditions on the interior circle - * - * - 0: Across the origin - * - 1: Dirichlet - */ - DirBC_Interior, - /*! \brief Output paraview file - * - * Output paraview file for visualization - */ - paraview, - /*! \brief Divide the intervals of the grid by 2^(divideBy2) - * - * Divides the intervals of the grid by 2^(divideBy2) - * (defines how often to split the intervals of the grid at the midpoint) - */ - divideBy2, - /*! \brief Problem to solve - * - * Defines the problem to solve - * - 5: the classical problem (Zoni2019, aligned with the cartesian grid) - * - 6: more realistic problem (Emily & Virginie, aligned with the polar grid) - */ - prob, - /*! \brief Coefficient alpha - * - * Defines the coefficient alpha - * 0: arctan coeff (Sonnendrucker2019, private communication) - * 1: tanh coeff (Zoni2019) - * 2: tanh coeff (Zoni2019 with steeper and shifted jump) - */ - alpha_coeff, - /*! \brief Coefficient beta - * - * Defines the coefficient - * 0: beta = 0 - * 1: beta: 1/alpha for some cases, different in others (see coeffs in test_cases) - */ - beta_coeff, - /*! \brief Norm for stopping criterion - * Defines the norm used for the residual in the stopping criterion - * 0: L2 norm scaled by initial res. - * 1: Infinitiy norm scaled by initial res. - * 2: L2 norm - * 3: Infinitiy norm - */ - res_norm, - /*! \brief Read or write radii/angles files - * When f_grid_r/f_grid_theta not empty, - * 0: read radii/angles file for the grid. - * 1: write radii/angles file after creating the grid. - */ - write_radii_angles, - /*! \brief Check the error - * Compute the error w.r.t. the theoretical solution - * 0: do note check - * 1: check. If the parameter "sol_in" is given, the error is computed w.r.t. a solution read from a file. - */ - check_error, -}; -//! To be used with the gyro::dcntl vector. -enum dcontrols -{ - /*! \brief Radius of the disk - * - * Interior (R0) and exterior (R) radius of the disk-like shape - */ - r0_DB, - R0, - R, - /*! \brief angles inside the disk - * - * Start/end angle for the disk-like shape discretization - */ - THETA0, - THETA, - /*! \brief Parameters of the grid - * - * Defines the shape of the geometry: - * - if mod_pk = 0: circular geometry - * [x=r.cos(theta), y=r.sin(theta)] - * - elif mod_pk=1: stretched circular geometry (Shafranov geometry) - * [x=(1-kappa_eps)r*cos(theta)-delta_e*r^2, y=(1+kappa_eps)r*sin(theta)] - * - elif mod_pk=2: stretched circular geometry (Czarny geometry) - * [x=1/kappa_eps ( 1 - sqrt{1 + kappa_eps ( kappa_eps + 2r*cos(theta) )} ), y=y_0 + (delta_e \xi r sin(theta)) / (1 + kappa_eps x(r, theta))] - * [For more details, we refer to Bourne et al. (2023).] - * with - * - kappa_eps: Elongation (For the Shafranov geometry, the parameter is denoted kappa, for the Czarny geometry, it is epsilon. - * - delta_e: Shafranov shift (outward radial - * displacement of the centre of flux) (For the Shafranov geometry, this parameter is denoted delta, for the Czarny geometry, it is e.) - */ - kappa_eps, - delta_e, - /*! \brief Distance to boundary - * - * Defines the distance below which nodes are considered part of the boundary. - */ - tol_bound_check, - /*! \brief Threshold for convergence - * - * Threshold for convergence with stopping criterion: - * - scaled residual for extrapolation < 2 - * - evolution of error w.r.t. theoretical solution for extrapolation 2 - */ - rel_red_conv, - /*! \brief Timings - */ - t_arr_art_att, // Evaluation of arr, art, and att - t_coeff, // Evaluation of alpha and beta (subcounter of t_arr_art_att) - t_sol, - t_detDFinv, - t_trafo, -}; -//! To be used with the gyro::info vector. -enum info -{ -}; -//! To be used with the gyro::dinfo vector. -enum dinfo -{ -}; -//! Stencils are represented by vectors with: -// - -1: not in the stencil -// - n: position of the entry w.r.t other entries of the same node -enum stencil -{ - bottom_left, - bottom, - bottom_right, - left, - middle, - right, - top_left, - top, - top_right, -}; -} // namespace Param - -//const double PI = 3.141592653589793238463; -const double PI = M_PI; - -// See Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -// used as Param::mod_pk ("modified polar coordinates") in GMGPolar -enum geometry_type -{ - CIRCULAR = 0, // simple circular domain - SHAFRANOV = 1, // Fig. 6a - TRIANGULAR = 2, // Fig. 6b (also denoted Czarny) - CULHAM = 3 // Fig. 18 -}; - -enum alpha_val -{ - SONNENDRUCKER = 0, - ZONI = 1, - ZONI_SHIFTED = 2, - POISSON = 3, -}; - -// Defines the manufactured solution to compare the computed error against. -// see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1 -// or Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -enum problem_type -{ - FLAT = 1, - REFINED_RADIUS = 4, - CARTESIAN_R2 = 5, // - POLAR_R6 = 6, // Bourne et al., Eq. (22) - CARTESIAN_R6 = 7, // Bourne et al., Eq. (23) -}; -#endif // CONSTANTS_HXX diff --git a/include/exact_funcs.h b/include/exact_funcs.h deleted file mode 100644 index 9c27c943..00000000 --- a/include/exact_funcs.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -#pragma once - -class ExactFuncs -{ -public: - virtual ~ExactFuncs() - { - } - virtual double x(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void x(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void x(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const = 0; - virtual double y(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void y(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void y(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const = 0; - virtual double J_rr(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void J_rr(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void J_rr(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double J_rt(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void J_rt(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void J_rt(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double J_tr(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void J_tr(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void J_tr(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double J_tt(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void J_tt(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void J_tt(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double rho_glob(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void rho_glob(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void rho_glob(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double rho_pole(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void rho_pole(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void rho_pole(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; - virtual double coeffs1(double r, double Rmax) const = 0; - virtual void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const = 0; - virtual double coeffs2(double r, double Rmax) const = 0; - virtual void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const = 0; - virtual double phi_exact(double r, double theta, double kappa_eps, double delta_e, double Rmax) const = 0; - virtual void phi_exact(std::vector const& r, double theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol) const = 0; - virtual void phi_exact(double r, std::vector const& theta, double kappa_eps, double delta_e, double Rmax, - std::vector& sol, std::vector& sin_theta, - std::vector& cos_theta) const = 0; -}; diff --git a/include/gmgpolar.h b/include/gmgpolar.h deleted file mode 100644 index 50e3cc1d..00000000 --- a/include/gmgpolar.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// The class for the multigrid gmgpolar where each level is from class level - -/*! - * \file gmgpolar.h - * \brief Header for the class gmgpolar - * \author M. Kuehn, C. Kruse, P. Leleux - * \version 0.0 - */ -#ifndef GMGPOLAR_HXX_ -#define GMGPOLAR_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "config.h" -#include "constants.h" -#include "level.h" -#include "gyro.h" -#ifdef GMGPOLAR_USE_LIKWID -#include -#endif - -class gmgpolar -{ -public: - /******************************************************************************* - * Attributes - ******************************************************************************/ - /*************************************************************************** - * Grid levels - **************************************************************************/ - /*! Vector of levels for the MG scheme (geometry, operators, etc.) */ - int levels, levels_orig; // Number of levels - std::vector v_level; - - /*************************************************************************** - * Multigrid scheme - **************************************************************************/ - std::vector nrm_2_res; - std::vector nrm_2_err; - std::vector nrm_inf_res; - - /* execution times */ - // Setup - double t_setup; // prepare_op_levels - // Subcounters of Setup - double t_build; // build A and RHS - double t_facto_Ac; // factorization of coarse operator - double t_build_P; // build coarse nodes, line splitting and P - double t_build_Asc; // build Asc and Asc_ortho - double t_facto_Asc; // factorization of Asc - // Multigrid cycle - double t_total_mgcycle; // multigrid_cycle_extrapol - // Subcounter of Multigrid cycle - double t_smoothing; // pre- and post-smoothing (including solve Asc) - double t_residual; // computation of the residual - double t_restriction; // restriction - double t_Ac; // solve coarse operator - double t_prolongation; // prolongation and coarse grid correction - - double t_fine_residual; // computation of residual on level 0 (init and after iteration) - double t_error; // computation of final error - double t_applyA; // apply the operator A, method apply_A - - /******************************************************************************* - * Methods - ******************************************************************************/ - gmgpolar(); - ~gmgpolar(); - - void reset_timers(); - void create_grid_polar(); - void create_grid_polar_divide(); - void polar_multigrid(); - void check_geom(); - void define_coarse_nodes(); - void prepare_op_levels(); - void debug(); - void multigrid_iter(); - void multigrid_cycle_extrapol(int l); - void compute_residual(int l, int extrapol); - std::vector compute_error(); - double compute_backwarderror(); - -private: -/******************************************************************************* -* Attributes -******************************************************************************/ - -/******************************************************************************* -* Methods -******************************************************************************/ -}; - -#endif // GMGPOLAR_HXX diff --git a/include/gyro.h b/include/gyro.h deleted file mode 100644 index e6e39608..00000000 --- a/include/gyro.h +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// The class for all util fonctions and parameters including -// - parameters -// - the dirichlet boundary conditions -// - trafo functions - -/*! - * \file gyro.h - * \brief Header for the class gyro - * \author M. Kuehn, C. Kruse, P. Leleux - * \version 0.0 - */ -#ifndef GYRO_HXX_ -#define GYRO_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "constants.h" -#include "exact_funcs.h" - -// #define TIC t = clock() -// #define TOC ((double)(clock() - t)) / CLOCKS_PER_SEC -#define TIC t = omp_get_wtime() -#define TOC (omp_get_wtime() - t) - -namespace gyro -{ -// /******************************************************************************* -// * Timings -// ******************************************************************************/ -// extern double t_coeff; // compute coeff alpha -// extern double t_arr_art_att; // compute arr/art/Att -// extern double t_sol; // compute the exact solution (for Dirichlet, RHS, and error) -// extern double t_detDFinv; // compute the inverse of the determinant from the mapping of curvilinear coordinates -// extern double t_trafo; // compute transformation cartesian-curvilinear - -/******************************************************************************* - * Attributes - ******************************************************************************/ -/*************************************************************************** -* Controls and Informations -**************************************************************************/ -/*! The integer control array, see Controls::icontrols for the - * possible values - */ -extern std::vector icntl; - -/*! The real control array, see Controls::dcontrols for the - * possible values - */ -extern std::vector dcntl; - -/*! The integer info output array, see Controls::info */ -extern std::vector info; -/*! The real info output array, see Controls::dinfo */ -extern std::vector dinfo; -/*! The exact functions for the configuration*/ -extern std::unique_ptr functions; - -/* File names containing the grid - * Comma separated list of radii - */ -extern std::string f_grid_r, f_grid_theta; - -/* File name containing the solution as input - * 1 value per line - */ -extern std::string f_sol_in, f_sol_out; - -/******************************************************************************* - * Methods - ******************************************************************************/ -/*************************************************************************** -* Parameters -**************************************************************************/ -void init_params(); -void show_params(); -void get_geometry_coeffs(geometry_type geom); -void select_functions_class(int alpha_coeff, int beta_coeff, int geom, int prob); - -/*************************************************************************** -* Boundary and solution -**************************************************************************/ -/************************ - * Single - ************************/ -double distBoundary(double x, double y, int verbose); -double eval_def_rhs(double r, double theta, int verbose); -int sign(double n); -double def_solution_rt(double r, double t, int verbose); -/************************ - * Vector - ************************/ -std::vector eval_def_rhs(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose); -std::vector def_solution_rt(double r_i, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose); - -/*************************************************************************** -* Diffusivity and operator -**************************************************************************/ -/************************ - * Single - ************************/ -double coeff_alpha(double r, int verbose); -double coeff_beta(double r, int verbose); -double detDFinv(double r, double theta, int verbose); -double arr(double r, double theta, int verbose); -double art(double r, double theta, int verbose); -double att(double r, double theta, int verbose); -void arr_att_art(double r, double theta, double& arr, double& att, double& art, int verbose); -/************************ - * Vector - ************************/ -std::vector coeff_alpha(std::vector r, int verbose); -std::vector coeff_beta(std::vector r, int verbose); -std::vector detDFinv(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose); -std::vector detDFinv(std::vector r, double theta, int verbose); -std::vector arr(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose); -std::vector art(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose); -std::vector att(double r, std::vector theta, std::vector cos_theta, - std::vector sin_theta, int ntheta, int verbose); -void arr_att_art(double r, std::vector theta, std::vector cos_theta, std::vector sin_theta, - int ntheta, std::vector& arr, std::vector& att, std::vector& art, int verbose); -void arr_att_art(std::vector r, double theta, std::vector& arr, std::vector& att, - std::vector& art, int verbose); - -/*************************************************************************** -* Polar to cartesian and back -**************************************************************************/ -/************************ - * Single - ************************/ -void trafo(double& r_i, double& theta_j, double& x, double& y, int verbose); -void trafo_back(double& r_i, double& theta_j, double& x, double& y, int verbose); -/************************ - * Vector - ************************/ -void trafo(double r_i, std::vector theta, std::vector sin_theta, std::vector cos_theta, - int ntheta, std::vector& x, std::vector& y, int verbose); - -/*************************************************************************** -* Display arrays or vectors -**************************************************************************/ -/*! - * \brief Forwards all values inside an array to std::cout. - * - * \param na: Size of the array. - * \param a: The array. - * \param s_a: Name of the array (to be printed). - * - */ -template -void disp(int na, T* a, const std::string& s_a) -{ - std::cout << s_a << "(" << na << "): "; - for (int i = 0; i < na; i++) - std::cout << a[i] << " "; - std::cout << "\n"; -} - -/*! - * \brief Forwards all values inside a vector to std::cout. - * - * \param a: The vector. - * \param s_a: Name of the vector (to be printed). - * - */ -template -void disp(std::vector a, const std::string& s_a) -{ - std::cout << s_a << "(" << a.size() << "): "; - for (std::size_t i = 0; i < a.size(); i++) - std::cout << a[i] << " "; - std::cout << "\n"; -} - -/*************************************************************************** -* Matrix operations -**************************************************************************/ -void sp_dgemv(int trans, int m, int n, double alpha, std::vector row_indices, std::vector col_indices, - std::vector vals, int lda, std::vector x, int incx, double beta, std::vector& y, - int incy); -double norm(std::vector x); -double A_norm(std::vector x, int m, std::vector row_indices, std::vector col_indices, - std::vector vals); -} // namespace gyro - -#endif // GYRO_HXX_ diff --git a/include/level.h b/include/level.h deleted file mode 100644 index f8167002..00000000 --- a/include/level.h +++ /dev/null @@ -1,319 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// The class for a level in the gmgpolar, containing the disk-like shape -// geometry of the problem, the operator, etc. - -/*! - * \file level.h - * \brief Header for the class level - * \author M. Kuehn, C. Kruse, P. Leleux - * \version 0.0 - */ -#ifndef LEVEL_HXX_ -#define LEVEL_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config.h" -#include "gyro.h" - -#ifdef GMGPOLAR_USE_MUMPS - #include "mpi.h" - #include "dmumps_c.h" - - #define ICNTL(I) icntl[(I)-1] /* macro s.t. indices match documentation */ - #define CNTL(I) cntl[(I)-1] /* macro s.t. indices match documentation */ -#endif - -class level -{ -public: - /******************************************************************************* - * Attributes - ******************************************************************************/ - /*! the level (0=finest) */ - int l; - - /*! size of r and theta */ - int nr, ntheta; // Number of nodes - int ntheta_int, nr_int; // Number of intervals - - /* execution times */ - double t_smoothing, t_f_sc, t_Asc_ortho, t_Asc; - double t_get_ptr, t_get_stencil, t_get_smoother, t_get_row; - - /*! Coordinates in r and theta directions */ - std::vector r; - std::vector is_bound; - std::vector theta, thetaplus, hplus; - std::vector theta_per, thetaplus_per, cos_theta, sin_theta, cos_theta_per, sin_theta_per; - std::vector theta_PI, cos_theta_PI, sin_theta_PI; - - /*! Coarse nodes */ - int coarse_nodes; - std::vector coarse_nodes_list_r; - std::vector coarse_nodes_list_theta; - - /*! Operator */ - int m, nz; - std::vector row_indices, col_indices; - std::vector vals; - // Factorization of the coarse operator - // - using in-house solver - std::vector row_Ac_LU, col_Ac_LU; - std::vector vals_Ac_LU; -#ifdef GMGPOLAR_USE_MUMPS - // - using MUMPS - DMUMPS_STRUC_C mumps_Ac; - DMUMPS_STRUC_C mumps_across; -#endif - /*! Beta coefficient update */ - std::vector betaVec; - - /*! RHS */ - std::vector fVec; - std::vector fVec_initial; - - /*! Solution */ - std::vector sol_in; - - /*! Prolongation */ - int mc, nz_P, nz_P_inj, nz_P_ex; - std::vector ri_prol, ci_prol; - std::vector v_prol; - std::vector ri_prol_inj, ci_prol_inj; - std::vector v_prol_inj; - std::vector ri_prol_ex, ci_prol_ex; - std::vector v_prol_ex; - - /*! Smoother */ - int delete_circles; - std::vector zebra1, zebra2; - std::vector> coloring; - std::vector zebra_BnW; - // size and number of entries in Asc/sc_ortho - std::vector m_sc; - std::vector nz_sc; - std::vector nz_sc_ortho; - // Asc and Asc_ortho matrices stored in 6 2D vectors: - // - smoother(Circle-Radial) + color(Black/White) (array) - // - ij (vect) - // - row/col/val (vect) - std::vector> A_Zebra_r; - std::vector> A_Zebra_c; - std::vector> A_Zebra_v; - std::vector> A_Zebra_r_row[4]; - std::vector> A_Zebra_c_row[4]; - std::vector> A_Zebra_v_row[4]; - - // Number of blocks per smoother (and maximum unmber of block as 5th element) - std::vector nblocks; - std::vector> A_Zebra_Mix_r; - std::vector> A_Zebra_Mix_c; - std::vector> A_Zebra_Mix_v; - std::vector> A_Zebra_Mix_r_row[4]; - std::vector> A_Zebra_Mix_c_row[4]; - std::vector> A_Zebra_Mix_v_row[4]; - // Vectors necessary for the parallel application of Asc_ortho in multigrid_smoothing - std::vector shift_vect_s2, shift_vect_s3, ptr_vect_s2, ptr_vect_s3; - // Factorization of Asc - // - using in-house solver - std::vector> A_Zebra_r_LU; - std::vector> A_Zebra_c_LU; - std::vector> A_Zebra_v_LU; - std::vector> A_Zebra_r_LU_row[4]; - std::vector> A_Zebra_c_LU_row[4]; - std::vector> A_Zebra_v_LU_row[4]; -#ifdef GMGPOLAR_USE_MUMPS - // - using MUMPS - DMUMPS_STRUC_C mumps_A_Zebra[4]; - - std::vector mumps_A_Zebra_row[4]; -#endif - - /* Dependencies */ - // int *dep_Asc_ortho, *dep_Asc, *dep_u; - std::vector dep_Asc_ortho, dep_Asc; - std::vector size_Asc_ortho, size_Asc; - - /*! Solution */ - std::vector u; - // u from the previous smoothing procedure - // - for the circular smoother - std::vector u_previous_c; - // - for the radial smoother - std::vector u_previous_r; - std::vector res; // residual - - /******************************************************************************* - * Methods - ******************************************************************************/ - level(int l_); - ~level(); - void reset_timers(); - - /*************************************************************************** - * Geometry - **************************************************************************/ - void build_r(); - void read_grid_r(); - void write_grid_r(); - void build_theta(); - void read_grid_theta(); - void write_grid_theta(); - void display_r(); - void display_theta(); - - /*************************************************************************** - * gmgpolar - **************************************************************************/ - void define_coarse_nodes_onelevel(level* finer); - void store_theta_n_co(); - // void define_colors(); - void define_line_splitting(); - - /* System */ - // original versions (deprecated) - void build_A0(); - void apply_A0(std::vector u, std::vector& Au); - void build_rhs0(); - // optimized - void define_nz(); - int get_ptr(int i, int j); - std::vector get_ptr(int j); - std::vector get_stencil(int j); - void build_A(); - void apply_A(std::vector u, std::vector& Au); - void build_rhs(); - void build_betaVec(); - void read_sol(); - void write_sol(); - - /* Prolongator */ - // original versions (deprecated) - std::vector apply_prolongation_bi0(std::vector u, int mc, int ncoarse, std::vector coarse_r, - std::vector coarse_theta, int trans); - std::vector apply_prolongation_inj0(std::vector u, int mc, int ncoarse, std::vector coarse_r, - std::vector coarse_theta, int trans); - std::vector apply_prolongation_ex0(std::vector u, int mc, int ncoarse, std::vector coarse_r, - std::vector coarse_theta, int trans); - // optimized - void define_nz_P(); - void build_prolongation_bi(); - std::vector apply_prolongation_bi(std::vector u); - std::vector apply_restriction_bi(std::vector u); - void build_prolongation_inj(); - std::vector apply_prolongation_inj(std::vector u); - std::vector apply_restriction_inj(std::vector u); - void build_prolongation_ex(); - std::vector apply_prolongation_ex(std::vector u); - std::vector apply_restriction_ex(std::vector u); - - /* Smoothing */ - void multigrid_smoothing(int smoother, int v, std::vector& f_Asc_u, int nblocks, int c, int* dep_Asc_cur, - int* dep_Asc_prev, int* dep_Asc1, int* dep_Asc_ortho_cur); - // void build_fsc(std::vector& f_sc, int smoother); - // void build_fsc(std::vector& f_sc, std::vector& f, int smoother, int loc_to_glob); - void build_fsc(std::vector& f_sc, std::vector& f, int smoother, int loc_to_glob, int start, - int end); - // original versions (deprecated) - void multigrid_smoothing0(int smoother); - void build_fsc0(std::vector& f_sc, int smoother); - void build_Asc0(); - void apply_Asc_ortho0(std::vector& Au, int smoother); - // optimized - void define_m_nz_Asc(); - int define_nz_Asc_ij(int smoother, int ij, int ortho); - std::vector get_ptr_sc(int j, int smoother, int ortho); - int get_smoother(int i, int j); - std::vector get_smoother_circle(int i); - std::vector get_smoother_radial(int j); - std::vector get_stencil_sc(int j, int smoother, int ortho); - int get_row(int i, int j, int smoother, int extrapol); - int mapping_usc_to_u(int ind_sc, int smoother); - std::vector mapping_usc_to_u(int ind_sc_start, int ind_sc_end, int smoother); - std::vector get_row(int j, int smoother, int extrapol, int local, int col_wise); - std::vector get_row_i(int i, int size, int smoother, int extrapol); - std::vector get_row_i_glob(int i, int size, int smoother, int extrapol); - void build_Asc(); - void build_Asc_ortho(int smoother); - void apply_Asc_ortho(std::vector& Au, std::vector& u, int smoother, int v, int c, int* dep_Asc_cur, - int* dep_Asc_prev, int* dep_Asc1, int* dep_Asc_ortho_cur); - void apply_Asc_ortho2(std::vector& Au, std::vector u, int smoother); - void apply_Asc_ortho_ij(int _ij, std::vector& Au, std::vector u, int smoother_todo); - - /* Direct solver */ - // original versions (deprecated) - std::vector solve_gaussian_elimination_fb_subst(std::vector A_row_indices, - std::vector A_col_indices, std::vector A_vals, - std::vector f); - double get_element(std::vector A_row_indices, std::vector A_col_indices, std::vector A_vals, - int row_index, int col_index); - void set_element(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int row_index, int col_index, double value); - // optimized - void facto_gaussian_elimination(std::vector& A_row_indices, std::vector& A_col_indices, - std::vector& A_vals, int m_solution); - std::vector solve_gaussian_elimination(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f); -#ifdef GMGPOLAR_USE_MUMPS - void init_mumps(DMUMPS_STRUC_C& mumps); - void facto_mumps(DMUMPS_STRUC_C& mumps, std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, int m_solution); - std::vector solve_mumps(DMUMPS_STRUC_C& mumps, std::vector f); - void finalize_mumps(DMUMPS_STRUC_C& mumps); -#endif - // specialized - void fill_in_circle(int ij, int smoother); - std::vector solve_diag(std::vector A_vals, std::vector f); - void facto_circle(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int m_solution); - std::vector solve_circle(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f); - void facto_radial(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int m_solution); - std::vector solve_radial(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f); - -private: - /******************************************************************************* - * Attributes - ******************************************************************************/ - - /******************************************************************************* - * Methods - ******************************************************************************/ -}; - -#endif // LEVEL_HXX diff --git a/include/test_cases/CartesianR2GyroSonnendruckerCircular.h b/include/test_cases/CartesianR2GyroSonnendruckerCircular.h deleted file mode 100644 index c24669f5..00000000 --- a/include/test_cases/CartesianR2GyroSonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroSonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroSonnendruckerShafranov.h b/include/test_cases/CartesianR2GyroSonnendruckerShafranov.h deleted file mode 100644 index 05e1771a..00000000 --- a/include/test_cases/CartesianR2GyroSonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroSonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroSonnendruckerTriangular.h b/include/test_cases/CartesianR2GyroSonnendruckerTriangular.h deleted file mode 100644 index cd266e6b..00000000 --- a/include/test_cases/CartesianR2GyroSonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroSonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniCircular.h b/include/test_cases/CartesianR2GyroZoniCircular.h deleted file mode 100644 index 252ac6f1..00000000 --- a/include/test_cases/CartesianR2GyroZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniShafranov.h b/include/test_cases/CartesianR2GyroZoniShafranov.h deleted file mode 100644 index a01d118f..00000000 --- a/include/test_cases/CartesianR2GyroZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniShiftedCircular.h b/include/test_cases/CartesianR2GyroZoniShiftedCircular.h deleted file mode 100644 index 001af54f..00000000 --- a/include/test_cases/CartesianR2GyroZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniShiftedShafranov.h b/include/test_cases/CartesianR2GyroZoniShiftedShafranov.h deleted file mode 100644 index 6c93b95c..00000000 --- a/include/test_cases/CartesianR2GyroZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniShiftedTriangular.h b/include/test_cases/CartesianR2GyroZoniShiftedTriangular.h deleted file mode 100644 index b88c1615..00000000 --- a/include/test_cases/CartesianR2GyroZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2GyroZoniTriangular.h b/include/test_cases/CartesianR2GyroZoniTriangular.h deleted file mode 100644 index 0a415ada..00000000 --- a/include/test_cases/CartesianR2GyroZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2GyroZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2PoissonCircular.h b/include/test_cases/CartesianR2PoissonCircular.h deleted file mode 100644 index 309c09ae..00000000 --- a/include/test_cases/CartesianR2PoissonCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2PoissonCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2PoissonShafranov.h b/include/test_cases/CartesianR2PoissonShafranov.h deleted file mode 100644 index 22755ea1..00000000 --- a/include/test_cases/CartesianR2PoissonShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2PoissonShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2PoissonTriangular.h b/include/test_cases/CartesianR2PoissonTriangular.h deleted file mode 100644 index 2669a926..00000000 --- a/include/test_cases/CartesianR2PoissonTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2PoissonTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2SonnendruckerCircular.h b/include/test_cases/CartesianR2SonnendruckerCircular.h deleted file mode 100644 index a891827c..00000000 --- a/include/test_cases/CartesianR2SonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2SonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2SonnendruckerShafranov.h b/include/test_cases/CartesianR2SonnendruckerShafranov.h deleted file mode 100644 index 4737caf6..00000000 --- a/include/test_cases/CartesianR2SonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2SonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2SonnendruckerTriangular.h b/include/test_cases/CartesianR2SonnendruckerTriangular.h deleted file mode 100644 index 8751c113..00000000 --- a/include/test_cases/CartesianR2SonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2SonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniCircular.h b/include/test_cases/CartesianR2ZoniCircular.h deleted file mode 100644 index 8fca194b..00000000 --- a/include/test_cases/CartesianR2ZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniShafranov.h b/include/test_cases/CartesianR2ZoniShafranov.h deleted file mode 100644 index 04acbd35..00000000 --- a/include/test_cases/CartesianR2ZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniShiftedCircular.h b/include/test_cases/CartesianR2ZoniShiftedCircular.h deleted file mode 100644 index ebaa6455..00000000 --- a/include/test_cases/CartesianR2ZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniShiftedShafranov.h b/include/test_cases/CartesianR2ZoniShiftedShafranov.h deleted file mode 100644 index eb2787af..00000000 --- a/include/test_cases/CartesianR2ZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniShiftedTriangular.h b/include/test_cases/CartesianR2ZoniShiftedTriangular.h deleted file mode 100644 index ba5c628c..00000000 --- a/include/test_cases/CartesianR2ZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR2ZoniTriangular.h b/include/test_cases/CartesianR2ZoniTriangular.h deleted file mode 100644 index 54cf2073..00000000 --- a/include/test_cases/CartesianR2ZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR2ZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroSonnendruckerCircular.h b/include/test_cases/CartesianR6GyroSonnendruckerCircular.h deleted file mode 100644 index 730fa811..00000000 --- a/include/test_cases/CartesianR6GyroSonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroSonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroSonnendruckerShafranov.h b/include/test_cases/CartesianR6GyroSonnendruckerShafranov.h deleted file mode 100644 index f5433e36..00000000 --- a/include/test_cases/CartesianR6GyroSonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroSonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroSonnendruckerTriangular.h b/include/test_cases/CartesianR6GyroSonnendruckerTriangular.h deleted file mode 100644 index 65e484e7..00000000 --- a/include/test_cases/CartesianR6GyroSonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroSonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniCircular.h b/include/test_cases/CartesianR6GyroZoniCircular.h deleted file mode 100644 index 6dfb4426..00000000 --- a/include/test_cases/CartesianR6GyroZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniShafranov.h b/include/test_cases/CartesianR6GyroZoniShafranov.h deleted file mode 100644 index 9ee83b9c..00000000 --- a/include/test_cases/CartesianR6GyroZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniShiftedCircular.h b/include/test_cases/CartesianR6GyroZoniShiftedCircular.h deleted file mode 100644 index 7f4bcb69..00000000 --- a/include/test_cases/CartesianR6GyroZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniShiftedShafranov.h b/include/test_cases/CartesianR6GyroZoniShiftedShafranov.h deleted file mode 100644 index bdc19f83..00000000 --- a/include/test_cases/CartesianR6GyroZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniShiftedTriangular.h b/include/test_cases/CartesianR6GyroZoniShiftedTriangular.h deleted file mode 100644 index 94976cbc..00000000 --- a/include/test_cases/CartesianR6GyroZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6GyroZoniTriangular.h b/include/test_cases/CartesianR6GyroZoniTriangular.h deleted file mode 100644 index 93611031..00000000 --- a/include/test_cases/CartesianR6GyroZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6GyroZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6PoissonCircular.h b/include/test_cases/CartesianR6PoissonCircular.h deleted file mode 100644 index 621637f6..00000000 --- a/include/test_cases/CartesianR6PoissonCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6PoissonCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6PoissonShafranov.h b/include/test_cases/CartesianR6PoissonShafranov.h deleted file mode 100644 index 6692bd15..00000000 --- a/include/test_cases/CartesianR6PoissonShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6PoissonShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6PoissonTriangular.h b/include/test_cases/CartesianR6PoissonTriangular.h deleted file mode 100644 index 3676de9c..00000000 --- a/include/test_cases/CartesianR6PoissonTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6PoissonTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6SonnendruckerCircular.h b/include/test_cases/CartesianR6SonnendruckerCircular.h deleted file mode 100644 index bcf3776c..00000000 --- a/include/test_cases/CartesianR6SonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6SonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6SonnendruckerShafranov.h b/include/test_cases/CartesianR6SonnendruckerShafranov.h deleted file mode 100644 index 6230f9c2..00000000 --- a/include/test_cases/CartesianR6SonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6SonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6SonnendruckerTriangular.h b/include/test_cases/CartesianR6SonnendruckerTriangular.h deleted file mode 100644 index e66b466c..00000000 --- a/include/test_cases/CartesianR6SonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6SonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniCircular.h b/include/test_cases/CartesianR6ZoniCircular.h deleted file mode 100644 index 11a028ce..00000000 --- a/include/test_cases/CartesianR6ZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniShafranov.h b/include/test_cases/CartesianR6ZoniShafranov.h deleted file mode 100644 index 0dd4f8f9..00000000 --- a/include/test_cases/CartesianR6ZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniShiftedCircular.h b/include/test_cases/CartesianR6ZoniShiftedCircular.h deleted file mode 100644 index f8694125..00000000 --- a/include/test_cases/CartesianR6ZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniShiftedShafranov.h b/include/test_cases/CartesianR6ZoniShiftedShafranov.h deleted file mode 100644 index 1214790f..00000000 --- a/include/test_cases/CartesianR6ZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniShiftedTriangular.h b/include/test_cases/CartesianR6ZoniShiftedTriangular.h deleted file mode 100644 index 3c1e7d9b..00000000 --- a/include/test_cases/CartesianR6ZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/CartesianR6ZoniTriangular.h b/include/test_cases/CartesianR6ZoniTriangular.h deleted file mode 100644 index 9963b1fa..00000000 --- a/include/test_cases/CartesianR6ZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class CartesianR6ZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroSonnendruckerCircular.h b/include/test_cases/PolarR6GyroSonnendruckerCircular.h deleted file mode 100644 index 6da6cd5a..00000000 --- a/include/test_cases/PolarR6GyroSonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroSonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroSonnendruckerShafranov.h b/include/test_cases/PolarR6GyroSonnendruckerShafranov.h deleted file mode 100644 index 1b034f7e..00000000 --- a/include/test_cases/PolarR6GyroSonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroSonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroSonnendruckerTriangular.h b/include/test_cases/PolarR6GyroSonnendruckerTriangular.h deleted file mode 100644 index 887b81b5..00000000 --- a/include/test_cases/PolarR6GyroSonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroSonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniCircular.h b/include/test_cases/PolarR6GyroZoniCircular.h deleted file mode 100644 index 01dd3f74..00000000 --- a/include/test_cases/PolarR6GyroZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniShafranov.h b/include/test_cases/PolarR6GyroZoniShafranov.h deleted file mode 100644 index c2976c2c..00000000 --- a/include/test_cases/PolarR6GyroZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniShiftedCircular.h b/include/test_cases/PolarR6GyroZoniShiftedCircular.h deleted file mode 100644 index d860fd84..00000000 --- a/include/test_cases/PolarR6GyroZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniShiftedCulham.h b/include/test_cases/PolarR6GyroZoniShiftedCulham.h deleted file mode 100644 index cd3b6fab..00000000 --- a/include/test_cases/PolarR6GyroZoniShiftedCulham.h +++ /dev/null @@ -1,82 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include "exact_funcs.h" - -class PolarR6GyroZoniShiftedCulham: public ExactFuncs -{ -public: - PolarR6GyroZoniShiftedCulham(); - double x(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double rho_glob(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double phi_exact(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double my_sum(std::array& f, int64_t start_idx, int64_t end_idx) const; - double q(double rr) const; - double dq(double rr) const; - double p(double rr) const; - double dp(double rr) const; - double dg(double rr, double g) const; - double double_deriv(double rr, double c, double g, double dg, double val, double d_val) const; - double g(double rr) const; - double Delta(double rr) const; - double Delta_prime(double rr) const; - double E(double rr) const; - double T(double rr) const; - double E_prime(double rr) const; - double T_prime(double rr) const; - double P(double rr) const; - double dP(double rr) const; - double J_xr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_xr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_xr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_xq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_xq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_yr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_yr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_yq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_yq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - std::array g_array; - std::array Delta_array; - std::array Delta_prime_array; - std::array E_array; - std::array T_array; - std::array E_prime_array; - std::array T_prime_array; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniShiftedShafranov.h b/include/test_cases/PolarR6GyroZoniShiftedShafranov.h deleted file mode 100644 index cd28e904..00000000 --- a/include/test_cases/PolarR6GyroZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniShiftedTriangular.h b/include/test_cases/PolarR6GyroZoniShiftedTriangular.h deleted file mode 100644 index f8320225..00000000 --- a/include/test_cases/PolarR6GyroZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6GyroZoniTriangular.h b/include/test_cases/PolarR6GyroZoniTriangular.h deleted file mode 100644 index 6f44fcf2..00000000 --- a/include/test_cases/PolarR6GyroZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6GyroZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6PoissonCircular.h b/include/test_cases/PolarR6PoissonCircular.h deleted file mode 100644 index 84befe50..00000000 --- a/include/test_cases/PolarR6PoissonCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6PoissonCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6PoissonShafranov.h b/include/test_cases/PolarR6PoissonShafranov.h deleted file mode 100644 index e892609e..00000000 --- a/include/test_cases/PolarR6PoissonShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6PoissonShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6PoissonTriangular.h b/include/test_cases/PolarR6PoissonTriangular.h deleted file mode 100644 index 4cd23e0e..00000000 --- a/include/test_cases/PolarR6PoissonTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6PoissonTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6SonnendruckerCircular.h b/include/test_cases/PolarR6SonnendruckerCircular.h deleted file mode 100644 index 888214e2..00000000 --- a/include/test_cases/PolarR6SonnendruckerCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6SonnendruckerCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6SonnendruckerShafranov.h b/include/test_cases/PolarR6SonnendruckerShafranov.h deleted file mode 100644 index 02b36d7e..00000000 --- a/include/test_cases/PolarR6SonnendruckerShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6SonnendruckerShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6SonnendruckerTriangular.h b/include/test_cases/PolarR6SonnendruckerTriangular.h deleted file mode 100644 index aa7e43b3..00000000 --- a/include/test_cases/PolarR6SonnendruckerTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6SonnendruckerTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniCircular.h b/include/test_cases/PolarR6ZoniCircular.h deleted file mode 100644 index 83942c36..00000000 --- a/include/test_cases/PolarR6ZoniCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniShafranov.h b/include/test_cases/PolarR6ZoniShafranov.h deleted file mode 100644 index 179db130..00000000 --- a/include/test_cases/PolarR6ZoniShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniShiftedCircular.h b/include/test_cases/PolarR6ZoniShiftedCircular.h deleted file mode 100644 index 312c0156..00000000 --- a/include/test_cases/PolarR6ZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniShiftedShafranov.h b/include/test_cases/PolarR6ZoniShiftedShafranov.h deleted file mode 100644 index 15a7fee5..00000000 --- a/include/test_cases/PolarR6ZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniShiftedTriangular.h b/include/test_cases/PolarR6ZoniShiftedTriangular.h deleted file mode 100644 index 628971b6..00000000 --- a/include/test_cases/PolarR6ZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/PolarR6ZoniTriangular.h b/include/test_cases/PolarR6ZoniTriangular.h deleted file mode 100644 index a6f8a693..00000000 --- a/include/test_cases/PolarR6ZoniTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class PolarR6ZoniTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/RefinedGyroZoniShiftedCircular.h b/include/test_cases/RefinedGyroZoniShiftedCircular.h deleted file mode 100644 index 69a7c919..00000000 --- a/include/test_cases/RefinedGyroZoniShiftedCircular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class RefinedGyroZoniShiftedCircular: public ExactFuncs -{ -public: - double x(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const; - void J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/RefinedGyroZoniShiftedCulham.h b/include/test_cases/RefinedGyroZoniShiftedCulham.h deleted file mode 100644 index 2369a64e..00000000 --- a/include/test_cases/RefinedGyroZoniShiftedCulham.h +++ /dev/null @@ -1,82 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include "exact_funcs.h" - -class RefinedGyroZoniShiftedCulham: public ExactFuncs -{ -public: - RefinedGyroZoniShiftedCulham(); - double x(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void x(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void y(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double rho_glob(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double phi_exact(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double my_sum(std::array& f, int64_t start_idx, int64_t end_idx) const; - double q(double rr) const; - double dq(double rr) const; - double p(double rr) const; - double dp(double rr) const; - double dg(double rr, double g) const; - double double_deriv(double rr, double c, double g, double dg, double val, double d_val) const; - double g(double rr) const; - double Delta(double rr) const; - double Delta_prime(double rr) const; - double E(double rr) const; - double T(double rr) const; - double E_prime(double rr) const; - double T_prime(double rr) const; - double P(double rr) const; - double dP(double rr) const; - double J_xr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_xr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_xr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_xq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_xq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_yr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_yr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const; - void J_yq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const; - void J_yq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - std::array g_array; - std::array Delta_array; - std::array Delta_prime_array; - std::array E_array; - std::array T_array; - std::array E_prime_array; - std::array T_prime_array; -}; - - diff --git a/include/test_cases/RefinedGyroZoniShiftedShafranov.h b/include/test_cases/RefinedGyroZoniShiftedShafranov.h deleted file mode 100644 index 5c0a3166..00000000 --- a/include/test_cases/RefinedGyroZoniShiftedShafranov.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class RefinedGyroZoniShiftedShafranov: public ExactFuncs -{ -public: - double x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/include/test_cases/RefinedGyroZoniShiftedTriangular.h b/include/test_cases/RefinedGyroZoniShiftedTriangular.h deleted file mode 100644 index 7edb7105..00000000 --- a/include/test_cases/RefinedGyroZoniShiftedTriangular.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include -#include "exact_funcs.h" - - -class RefinedGyroZoniShiftedTriangular: public ExactFuncs -{ -public: - double x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; - double coeffs1(double r, double Rmax) const override; - void coeffs1(std::vector const& r, double Rmax, std::vector& sol) const override; - double coeffs2(double r, double Rmax) const override; - void coeffs2(std::vector const& r, double Rmax, std::vector& sol) const override; - double phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const override; - void phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const override; - void phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const override; -private: - double J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; - double J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const; - void J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const; - void J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const; -}; - - diff --git a/make_points_r.py b/make_points_r.py deleted file mode 100644 index 2abbd93a..00000000 --- a/make_points_r.py +++ /dev/null @@ -1,21 +0,0 @@ -from argparse import ArgumentParser -import numpy as np - -parser = ArgumentParser(description='Tool for generating points') -parser.add_argument('Nc', type=int, help='Number of cells (must be a multiple of 2)') -parser.add_argument('outfile', type=str, help='File where points should be printed') -parser.add_argument('--R0', type=float, default=1e-5, help='Minimum radius') -parser.add_argument('--R', type=float, default=1.0, help='Maximum radius') -args = parser.parse_args() - - -R0 = args.R0 -R = args.R -outfile = args.outfile -N = args.Nc - -pts = np.linspace(R0, R, N+1) - -with open(outfile,'w') as f: - for p in pts: - print(p, file=f) diff --git a/make_points_theta.py b/make_points_theta.py deleted file mode 100644 index ff147cba..00000000 --- a/make_points_theta.py +++ /dev/null @@ -1,18 +0,0 @@ -from argparse import ArgumentParser -import numpy as np - -parser = ArgumentParser(description='Tool for generating points') -parser.add_argument('Nc', type=int, help='Number of cells (must be a multiple of 2)') -parser.add_argument('outfile', type=str, help='File where points should be printed') -args = parser.parse_args() - - -outfile = args.outfile -N = args.Nc - -pts = np.linspace(0.0, 2*np.pi, N, endpoint=False) - -with open(outfile,'w') as f: - for p in pts: - print(p, file=f) - diff --git a/parse_rhs.py b/parse_rhs.py deleted file mode 100644 index eca99b0a..00000000 --- a/parse_rhs.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/python2 - -import sys - -#rhs="-(-r^3*cos(theta) + r^2*(2*r - 13/5)*cos(theta) + 13*r^2*cos(theta)/5 + 2*r*(-r + 13/10)^2*cos(theta) + r*(2*r^2*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*(-r + 13/10)^2*cos(theta)) - 169*r*cos(theta)/100)/r;" -#rhs="-(-r^3*cos(theta) +pow( r, 2)*(2*r - 13/5)*cos(theta) + 13*pow(r, 2)*cos(theta)/5 + 2*r*pow(-r + 13/10, 2)*cos(theta) + r*(2*pow(r, 2)*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*pow(-r + 13/10, 2)*cos(theta)) - 169*r*cos(theta)/100)/r;" -#rhs="-(-pow(r, 3)*cos(theta) +pow( r, 2)*(2*r - 13/5)*cos(theta) + 13*pow(r, 2)*cos(theta)/5 + 2*r*pow(-r + 13/10, 2)*cos(theta) + r*(2*pow(r, 2)*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*pow(-r + 13/10, 2)*cos(theta)) - 169*r*cos(theta)/100)/r;" - -#rhs = "-(-12553587811485704*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))/(3242591731706757*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(2*r^2*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*(-r + 13/10)^2*cos(theta)) + (r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-r^3*cos(theta) + 13*r^2*cos(theta)/5 - 169*r*cos(theta)/100))/r;" -#rhs = "-(-12553587811485704*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))/(3242591731706757*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(2*pow(r, 2)*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*pow(-r + 13/10, 2)*cos(theta)) + (pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-pow(r, 3)*cos(theta) + 13*pow(r, 2)*cos(theta)/5 - 169*r*cos(theta)/100))/r;" - -#rhs="(4/((obj.kappa + 1)^2*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)) + (32*obj.delta^2*y^2)/((obj.kappa - 1)^2*(obj.kappa + 1)^4*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2) + (4*obj.delta^2*((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2))/((obj.kappa - 1)^2*(obj.kappa + 1)^2*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2) + (32*obj.delta^4*y^2*((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2))/((obj.kappa - 1)^4*(obj.kappa + 1)^4*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^3) + (16*obj.delta^4*y^2*((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2))/((obj.kappa - 1)^4*(obj.kappa + 1)^4*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(3/2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2))/(2*(((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1))^(1/2)) + (4/((obj.kappa - 1)^2*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)) + (2*((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)*(((4*obj.delta*((2*obj.delta*x)/(obj.kappa - 1)^2 - 1))/(obj.kappa - 1)^2 - (8*obj.delta^2*x)/(obj.kappa - 1)^4)/(2*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)) - (2*obj.delta)/(obj.kappa - 1)^2)^2)/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^3 - (8*x*(((4*obj.delta*((2*obj.delta*x)/(obj.kappa - 1)^2 - 1))/(obj.kappa - 1)^2 - (8*obj.delta^2*x)/(obj.kappa - 1)^4)/(2*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)) - (2*obj.delta)/(obj.kappa - 1)^2))/((obj.kappa - 1)^2*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2) + (((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)*((4*obj.delta*((2*obj.delta*x)/(obj.kappa - 1)^2 - 1))/(obj.kappa - 1)^2 - (8*obj.delta^2*x)/(obj.kappa - 1)^4)^2)/(4*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(3/2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2))/(2*(((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1))^(1/2)) - ((4*x)/((obj.kappa - 1)^2*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)) - (((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)*(((4*obj.delta*((2*obj.delta*x)/(obj.kappa - 1)^2 - 1))/(obj.kappa - 1)^2 - (8*obj.delta^2*x)/(obj.kappa - 1)^4)/(2*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)) - (2*obj.delta)/(obj.kappa - 1)^2))/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2)^2/(4*(((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1))^(3/2)) - ((4*y)/((obj.kappa + 1)^2*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)) + (4*obj.delta^2*y*((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2))/((obj.kappa - 1)^2*(obj.kappa + 1)^2*(((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2)*((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1)^2))^2/(4*(((2*x^2)/(obj.kappa - 1)^2 + (2*y^2)/(obj.kappa + 1)^2)/((((2*obj.delta*x)/(obj.kappa - 1)^2 - 1)^2 - (4*obj.delta^2*(x^2/(obj.kappa - 1)^2 + y^2/(obj.kappa + 1)^2))/(obj.kappa - 1)^2)^(1/2) - (2*obj.delta*x)/(obj.kappa - 1)^2 + 1))^(3/2));" -#rhs="(4/(pow(obj.kappa + 1, 2)*((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1)) + (32*pow(obj.delta, 2)*pow(y, 2))/(pow(obj.kappa - 1, 2)*(obj.kappa + 1)^4*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)) + (4*pow(obj.delta, 2)*((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2)))/(pow(obj.kappa - 1, 2)*pow(obj.kappa + 1, 2)*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)) + (32*obj.delta^4*pow(y, 2)*((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2)))/((obj.kappa - 1)^4*(obj.kappa + 1)^4*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 3)) + (16*obj.delta^4*pow(y, 2)*((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2)))/((obj.kappa - 1)^4*(obj.kappa + 1)^4*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(3/2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)))/(2*(((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))/((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1))^(1/2)) + (4/(pow(obj.kappa - 1, 2)*((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1)) + (2*((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))*pow(((4*obj.delta*((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1))/pow(obj.kappa - 1, 2) - (8*pow(obj.delta, 2)*x)/(obj.kappa - 1)^4)/(2*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)) - (2*obj.delta)/pow(obj.kappa - 1, 2), 2))/pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 3) - (8*x*(((4*obj.delta*((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1))/pow(obj.kappa - 1, 2) - (8*pow(obj.delta, 2)*x)/(obj.kappa - 1)^4)/(2*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)) - (2*obj.delta)/pow(obj.kappa - 1, 2)))/(pow(obj.kappa - 1, 2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)) + (((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))*pow((4*obj.delta*((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1))/pow(obj.kappa - 1, 2) - (8*pow(obj.delta, 2)*x)/(obj.kappa - 1)^4, 2))/(4*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(3/2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)))/(2*(((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))/((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1))^(1/2)) - pow((4*x)/(pow(obj.kappa - 1, 2)*((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1)) - (((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))*(((4*obj.delta*((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1))/pow(obj.kappa - 1, 2) - (8*pow(obj.delta, 2)*x)/(obj.kappa - 1)^4)/(2*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)) - (2*obj.delta)/pow(obj.kappa - 1, 2)))/pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2), 2)/(4*(((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))/((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1))^(3/2)) - pow((4*y)/(pow(obj.kappa + 1, 2)*((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1)) + (4*pow(obj.delta, 2)*y*((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2)))/(pow(obj.kappa - 1, 2)*pow(obj.kappa + 1, 2)*(pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2)*pow((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1, 2)), 2)/(4*(((2*pow(x, 2))/pow(obj.kappa - 1, 2) + (2*pow(y, 2))/pow(obj.kappa + 1, 2))/((pow((2*obj.delta*x)/pow(obj.kappa - 1, 2) - 1, 2) - (4*pow(obj.delta, 2)*(pow(x, 2)/pow(obj.kappa - 1, 2) +pow( y, 2)/pow(obj.kappa + 1, 2)))/pow(obj.kappa - 1, 2))^(1/2) - (2*obj.delta*x)/pow(obj.kappa - 1, 2) + 1))^(3/2));" - -#rhs="-(4*delta_e*r^2*(-r + 13/10)^2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r^2*(-r + 13/10)^2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) - 2*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 2*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*kappa_eps*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 2*r^2*(-r + 13/10)^2*(-delta_e*kappa_eps + delta_e)*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 2*r^2*(2*r - 13/5)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*r*(-r + 13/10)^2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + r*(2*r^2*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + ((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-r^3*cos(theta) + 13*r^2*cos(theta)/5 - 169*r*cos(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-r^2*(2*r - 13/5)*sin(theta) - 2*r*(-r + 13/10)^2*sin(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (2*(kappa_eps + 1)^2*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" -#rhs="-(4*delta_e*pow(r, 2)*pow(-r + 13/10, 2)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*pow(r, 2)*pow(-r + 13/10, 2)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) - 2*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 2*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*kappa_eps*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 2*pow(r, 2)*pow(-r + 13/10, 2)*(-delta_e*kappa_eps + delta_e)*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 2*pow(r, 2)*(2*r - 13/5)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*r*pow(-r + 13/10, 2)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + r*(2*pow(r, 2)*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-pow(r, 3)*cos(theta) + 13*pow(r, 2)*cos(theta)/5 - 169*r*cos(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-pow(r, 2)*(2*r - 13/5)*sin(theta) - 2*r*pow(-r + 13/10, 2)*sin(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (2*pow(kappa_eps + 1, 2)*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" - -#rhs="-(4*delta_e*r^2*(-r + 13/10)^2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r^2*(-r + 13/10)^2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) - 2*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 2*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*delta_e*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*kappa_eps*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 2*r^2*(-r + 13/10)^2*(-delta_e*kappa_eps + delta_e)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 25107175622971408*r^2*(-r + 13/10)^2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 2*r^2*(2*r - 13/5)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*r*(-r + 13/10)^2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 12553587811485704*r*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(2*r^2*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*(-r + 13/10)^2*cos(theta))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + ((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-r^3*cos(theta) + 13*r^2*cos(theta)/5 - 169*r*cos(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-r^2*(2*r - 13/5)*sin(theta) - 2*r*(-r + 13/10)^2*sin(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (r^2*(2*r - 13/5)*cos(theta) + 2*r*(-r + 13/10)^2*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (2*(kappa_eps + 1)^2*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-r^3*sin(theta) + 13*r^2*sin(theta)/5 - 169*r*sin(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" -#rhs="-(4*delta_e*pow(r, 2)*pow(-r + 13/10, 2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*pow(r, 2)*pow(-r + 13/10, 2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) - 2*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 2*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*delta_e*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*kappa_eps*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 2*pow(r, 2)*pow(-r + 13/10, 2)*(-delta_e*kappa_eps + delta_e)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 25107175622971408*pow(r, 2)*pow(-r + 13/10, 2)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 2*pow(r, 2)*(2*r - 13/5)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*r*pow(-r + 13/10, 2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 12553587811485704*r*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(2*pow(r, 2)*cos(theta) + 4*r*(2*r - 13/5)*cos(theta) + 2*pow(-r + 13/10, 2)*cos(theta))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-pow(r, 3)*cos(theta) + 13*pow(r, 2)*cos(theta)/5 - 169*r*cos(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-pow(r, 2)*(2*r - 13/5)*sin(theta) - 2*r*pow(-r + 13/10, 2)*sin(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(r, 2)*(2*r - 13/5)*cos(theta) + 2*r*pow(-r + 13/10, 2)*cos(theta))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (2*pow(kappa_eps + 1, 2)*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-pow(r, 3)*sin(theta) + 13*pow(r, 2)*sin(theta)/5 - 169*r*sin(theta)/100)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" - -#rhs="(4/((kappa_eps + 1)^2*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)) + (32*delta_e^2*y^2)/((kappa_eps - 1)^2*(kappa_eps + 1)^4*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2) + (4*delta_e^2*((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2))/((kappa_eps - 1)^2*(kappa_eps + 1)^2*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2) + (32*delta_e^4*y^2*((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2))/((kappa_eps - 1)^4*(kappa_eps + 1)^4*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^3) + (16*delta_e^4*y^2*((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2))/((kappa_eps - 1)^4*(kappa_eps + 1)^4*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(3/2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2))/(2*(((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1))^(1/2)) + (4/((kappa_eps - 1)^2*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)) + (2*((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)*(((4*delta_e*((2*delta_e*x)/(kappa_eps - 1)^2 - 1))/(kappa_eps - 1)^2 - (8*delta_e^2*x)/(kappa_eps - 1)^4)/(2*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)) - (2*delta_e)/(kappa_eps - 1)^2)^2)/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^3 - (8*x*(((4*delta_e*((2*delta_e*x)/(kappa_eps - 1)^2 - 1))/(kappa_eps - 1)^2 - (8*delta_e^2*x)/(kappa_eps - 1)^4)/(2*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)) - (2*delta_e)/(kappa_eps - 1)^2))/((kappa_eps - 1)^2*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2) + (((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)*((4*delta_e*((2*delta_e*x)/(kappa_eps - 1)^2 - 1))/(kappa_eps - 1)^2 - (8*delta_e^2*x)/(kappa_eps - 1)^4)^2)/(4*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(3/2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2))/(2*(((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1))^(1/2)) - ((4*x)/((kappa_eps - 1)^2*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)) - (((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)*(((4*delta_e*((2*delta_e*x)/(kappa_eps - 1)^2 - 1))/(kappa_eps - 1)^2 - (8*delta_e^2*x)/(kappa_eps - 1)^4)/(2*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)) - (2*delta_e)/(kappa_eps - 1)^2))/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2)^2/(4*(((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1))^(3/2)) - ((4*y)/((kappa_eps + 1)^2*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)) + (4*delta_e^2*y*((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2))/((kappa_eps - 1)^2*(kappa_eps + 1)^2*(((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2)*((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1)^2))^2/(4*(((2*x^2)/(kappa_eps - 1)^2 + (2*y^2)/(kappa_eps + 1)^2)/((((2*delta_e*x)/(kappa_eps - 1)^2 - 1)^2 - (4*delta_e^2*(x^2/(kappa_eps - 1)^2 + y^2/(kappa_eps + 1)^2))/(kappa_eps - 1)^2)^(1/2) - (2*delta_e*x)/(kappa_eps - 1)^2 + 1))^(3/2));" -#rhs="(4/(pow(kappa_eps + 1, 2)*(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1)) + (32*pow(delta_e, 2)*pow(y, 2))/(pow(kappa_eps - 1, 2)*pow(kappa_eps + 1, 4)*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)) + (4*pow(delta_e, 2)*((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2)))/(pow(kappa_eps - 1, 2)*pow(kappa_eps + 1, 2)*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)) + (32*pow(delta_e, 4)*pow(y, 2)*((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2)))/(pow(kappa_eps - 1, 4)*pow(kappa_eps + 1, 4)*(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 3)) + (16*pow(delta_e, 4)*pow(y, 2)*((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2)))/(pow(kappa_eps - 1, 4)*pow(kappa_eps + 1, 4)*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (3/2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)))/(2*pow(((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))/(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1), (1/2))) + (4/(pow(kappa_eps - 1, 2)*(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1)) + (2*((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))*pow(((4*delta_e*((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1))/pow(kappa_eps - 1, 2) - (8*pow(delta_e, 2)*x)/pow(kappa_eps - 1, 4))/(2*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))) - (2*delta_e)/pow(kappa_eps - 1, 2), 2))/pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 3) - (8*x*(((4*delta_e*((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1))/pow(kappa_eps - 1, 2) - (8*pow(delta_e, 2)*x)/pow(kappa_eps - 1, 4))/(2*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))) - (2*delta_e)/pow(kappa_eps - 1, 2)))/(pow(kappa_eps - 1, 2)*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)) + (((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))*pow((4*delta_e*((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1))/pow(kappa_eps - 1, 2) - (8*pow(delta_e, 2)*x)/pow(kappa_eps - 1, 4), 2))/(4*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (3/2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)))/(2*pow(((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))/(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1), (1/2))) - pow((4*x)/(pow(kappa_eps - 1, 2)*(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1)) - (((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))*(((4*delta_e*((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1))/pow(kappa_eps - 1, 2) - (8*pow(delta_e, 2)*x)/pow(kappa_eps - 1, 4))/(2*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))) - (2*delta_e)/pow(kappa_eps - 1, 2)))/pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2), 2)/(4*pow(((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))/(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1), (3/2))) - pow((4*y)/(pow(kappa_eps + 1, 2)*(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1)) + (4*pow(delta_e, 2)*y*((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2)))/(pow(kappa_eps - 1, 2)*pow(kappa_eps + 1, 2)*pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2))*pow(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1, 2)), 2)/(4*pow(((2*pow(x, 2))/pow(kappa_eps - 1, 2) + (2*pow(y, 2))/pow(kappa_eps + 1, 2))/(pow(pow((2*delta_e*x)/pow(kappa_eps - 1, 2) - 1, 2) - (4*pow(delta_e, 2)*(pow(x, 2)/pow(kappa_eps - 1, 2) +pow( y, 2)/pow(kappa_eps + 1, 2)))/pow(kappa_eps - 1, 2), (1/2)) - (2*delta_e*x)/pow(kappa_eps - 1, 2) + 1), (3/2)));" - -#rhs="-(4*pi^2*r^3*sin(theta)^2*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 8*pi^2*r^3*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta)) + 4*pi^2*r^3*sin(2*pi*r*sin(theta))*cos(theta)^2*cos(2*pi*r*cos(theta)) + 2*pi*r^2*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 2*pi*r^2*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) + r*(-8*pi*r*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) + 8*pi*r*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) - 4*pi^2*(-r^2 + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(theta)^2*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 8*pi^2*(-r^2 + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta)) - 4*pi^2*(-r^2 + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(2*pi*r*sin(theta))*cos(theta)^2*cos(2*pi*r*cos(theta)) - 2*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))) - 34277272230171325358342660906025*pi^2*r*sin(theta)^2*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))/5070602400912917605986812821504 + 34277272230171325358342660906025*pi^2*r*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta))/2535301200456458802993406410752 - 34277272230171325358342660906025*pi^2*r*sin(2*pi*r*sin(theta))*cos(theta)^2*cos(2*pi*r*cos(theta))/5070602400912917605986812821504 - 2*r*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) + 2*pi*(-r^2 + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 2*pi*(-r^2 + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) - 34277272230171325358342660906025*pi*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))/10141204801825835211973625643008 + 34277272230171325358342660906025*pi*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta)/10141204801825835211973625643008)/r;" -#rhs="-(4*pow(pi, 2)*pow(r, 3)*pow(sin(theta), 2)*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 8*pow(pi, 2)*pow(r, 3)*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta)) + 4*pow(pi, 2)*pow(r, 3)*sin(2*pi*r*sin(theta))*pow(cos(theta), 2)*cos(2*pi*r*cos(theta)) + 2*pi*pow(r, 2)*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 2*pi*pow(r, 2)*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) + r*(-8*pi*r*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) + 8*pi*r*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) - 4*pow(pi, 2)*(-pow(r, 2) + 34277272230171325358342660906025/20282409603651670423947251286016)*pow(sin(theta), 2)*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 8*pow(pi, 2)*(-pow(r, 2) + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta)) - 4*pow(pi, 2)*(-pow(r, 2) + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(2*pi*r*sin(theta))*pow(cos(theta), 2)*cos(2*pi*r*cos(theta)) - 2*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))) - 34277272230171325358342660906025*pow(pi, 2)*r*pow(sin(theta), 2)*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))/5070602400912917605986812821504 + 34277272230171325358342660906025*pow(pi, 2)*r*sin(theta)*sin(2*pi*r*cos(theta))*cos(theta)*cos(2*pi*r*sin(theta))/2535301200456458802993406410752 - 34277272230171325358342660906025*pow(pi, 2)*r*sin(2*pi*r*sin(theta))*pow(cos(theta), 2)*cos(2*pi*r*cos(theta))/5070602400912917605986812821504 - 2*r*sin(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) + 2*pi*(-pow(r, 2) + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta)) - 2*pi*(-pow(r, 2) + 34277272230171325358342660906025/20282409603651670423947251286016)*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta) - 34277272230171325358342660906025*pi*sin(theta)*cos(2*pi*r*sin(theta))*cos(2*pi*r*cos(theta))/10141204801825835211973625643008 + 34277272230171325358342660906025*pi*sin(2*pi*r*sin(theta))*sin(2*pi*r*cos(theta))*cos(theta)/10141204801825835211973625643008)/r;" - -#rhs="-(-2*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 2*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) - 4*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 8*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*kappa_eps*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*(4*PI*delta_e*(-r^2 + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 12553587811485704*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + ((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (2*(kappa_eps + 1)^2*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 25107175622971408*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" -#rhs="-(-2*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 2*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) - 4*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 8*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*kappa_eps*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*(4*PI*delta_e*(-pow(r, 2) + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(2*kappa_eps*sin(theta) + 2*sin(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*pow(PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 12553587811485704*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (2*pow(kappa_eps + 1, 2)*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 25107175622971408*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" - -#rhs="-(2*r*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(-8*PI*r*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 8*PI*r*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta) - 4*PI^2*(-r^2 + 169/100)*sin(theta)^2*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 8*PI^2*(-r^2 + 169/100)*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta)) - 4*PI^2*(-r^2 + 169/100)*sin(2*PI*r*sin(theta))*cos(theta)^2*cos(2*PI*r*cos(theta)) - 2*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)))/(2.6 + PI) - 22.2222222222222*r*(-2*r*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 2*PI*(-r^2 + 169/100)*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*(-r^2 + 169/100)*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta))/((2.6 + PI)*((11.1111111111111*r - 11.1111111111111)^2 + 1)) + 2*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(-2*r*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 2*PI*(-r^2 + 169/100)*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*(-r^2 + 169/100)*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta))/(2.6 + PI) + 2*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(4*PI^2*r^3*sin(theta)^2*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 8*PI^2*r^3*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta)) + 4*PI^2*r^3*sin(2*PI*r*sin(theta))*cos(theta)^2*cos(2*PI*r*cos(theta)) + 2*PI*r^2*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*r^2*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta) - 169*PI^2*r*sin(theta)^2*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta))/25 + 338*PI^2*r*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta))/25 - 169*PI^2*r*sin(2*PI*r*sin(theta))*cos(theta)^2*cos(2*PI*r*cos(theta))/25 - 169*PI*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta))/50 + 169*PI*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta)/50)/(2.6 + PI))/r;" -#rhs="-(2*r*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(-8*PI*r*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 8*PI*r*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta) - 4*pow(PI, 2)*(-pow(r, 2) + 169/100)*pow(sin(theta), 2)*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 8*pow(PI, 2)*(-pow(r, 2) + 169/100)*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta)) - 4*pow(PI, 2)*(-pow(r, 2) + 169/100)*sin(2*PI*r*sin(theta))*pow(cos(theta), 2)*cos(2*PI*r*cos(theta)) - 2*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)))/(2.6 + PI) - 22.2222222222222*r*(-2*r*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 2*PI*(-pow(r, 2) + 169/100)*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*(-pow(r, 2) + 169/100)*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta))/((2.6 + PI)*(pow(11.1111111111111*r - 11.1111111111111, 2) + 1)) + 2*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(-2*r*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) + 2*PI*(-pow(r, 2) + 169/100)*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*(-pow(r, 2) + 169/100)*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta))/(2.6 + PI) + 2*(-atan(11.1111111111111*r - 11.1111111111111) + 1.3)*(4*pow(PI, 2)*pow(r, 3)*pow(sin(theta), 2)*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 8*pow(PI, 2)*pow(r, 3)*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta)) + 4*pow(PI, 2)*pow(r, 3)*sin(2*PI*r*sin(theta))*pow(cos(theta), 2)*cos(2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta) - 169*pow(PI, 2)*r*pow(sin(theta), 2)*sin(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta))/25 + 338*pow(PI, 2)*r*sin(theta)*sin(2*PI*r*cos(theta))*cos(theta)*cos(2*PI*r*sin(theta))/25 - 169*pow(PI, 2)*r*sin(2*PI*r*sin(theta))*pow(cos(theta), 2)*cos(2*PI*r*cos(theta))/25 - 169*PI*sin(theta)*cos(2*PI*r*sin(theta))*cos(2*PI*r*cos(theta))/50 + 169*PI*sin(2*PI*r*sin(theta))*sin(2*PI*r*cos(theta))*cos(theta)/50)/(2.6 + PI))/r;" - -#rhs="-(-2*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*delta_e*r*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 2*delta_e*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*delta_e*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) - 4*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 8*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*kappa_eps*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + r*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*(4*PI*delta_e*(-r^2 + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + ((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (2*(kappa_eps + 1)^2*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" -#rhs="-(-2*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*delta_e*r*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*r*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 2*delta_e*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*delta_e*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) - 4*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 8*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*kappa_eps*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + r*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*(4*PI*delta_e*(-pow(r, 2) + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(2*kappa_eps*sin(theta) + 2*sin(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*pow(PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (2*pow(kappa_eps + 1, 2)*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" - -#rhs="-(-2*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 4*delta_e*r*((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 8*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 2*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) - 4*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 8*delta_e*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^3) + 4*kappa_eps*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*sin(theta)^2*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*(4*PI*delta_e*(-r^2 + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))^2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 12553587811485704*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + ((kappa_eps + 1)^2*sin(theta)^2 + (2*delta_e*r + kappa_eps*cos(theta) - cos(theta))^2)*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*r^2*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*r^2*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (2*(kappa_eps + 1)^2*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*r^2*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*r^2*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*r^2 + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + 25107175622971408*(-PI*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*((36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)^2 + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) - 4*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI^2*(-r^2 + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-r^2 + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-r^2 + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*r^2 - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(kappa_eps^2 - 4*kappa_eps*sin(theta)^2 + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*(2*delta_e*r*cos(theta) + kappa_eps - 1)^2))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" -#rhs="-(-2*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 4*delta_e*r*(pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 8*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 2*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*delta_e*r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) - 4*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*sign(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 8*delta_e*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 3)) + 4*kappa_eps*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*pow(sin(theta), 2)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + r*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*(4*PI*delta_e*(-pow(r, 2) + 169/100)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 4*PI*r*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + 4*PI*r*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(2*kappa_eps*sin(theta) + 2*sin(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*pow(PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*pow(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta), 2)*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 12553587811485704*r*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-delta_e*kappa_eps + delta_e)*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (pow(kappa_eps + 1, 2)*pow(sin(theta), 2) + pow(2*delta_e*r + kappa_eps*cos(theta) - cos(theta), 2))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) - 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*kappa_eps*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*kappa_eps*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) + 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 + 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*kappa_eps*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*kappa_eps*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50 + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta)) + 2*PI*pow(r, 2)*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 2*PI*pow(r, 2)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta) - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*(-2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(theta)*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))/50 - 169*PI*(2*PI*kappa_eps*r*cos(theta) + 2*PI*r*cos(theta))*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(theta)*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 - 169*PI*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))*cos(theta)/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (2*pow(kappa_eps + 1, 2)*sin(theta)*cos(theta) + (-2*kappa_eps*sin(theta) + 2*sin(theta))*(2*delta_e*r + kappa_eps*cos(theta) - cos(theta)))*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*PI*kappa_eps*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*kappa_eps*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) + 169*PI*kappa_eps*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*kappa_eps*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 2*PI*pow(r, 2)*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 2*PI*pow(r, 2)*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta)) - 169*PI*sin(theta)*sin(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*sin(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50 + 169*PI*cos(theta)*cos(2*PI*kappa_eps*r*sin(theta) + 2*PI*r*sin(theta))*cos(2*PI*delta_e*pow(r, 2) + 2*PI*kappa_eps*r*cos(theta) - 2*PI*r*cos(theta))/50)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + 25107175622971408*(-PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/(3242591731706757*(kappa_eps + 1)*(pow(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757, 2) + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 2*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*cos(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) - 4*(-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-delta_e*kappa_eps*r + delta_e*r + 2*kappa_eps*cos(theta))*(2*PI*r*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - 2*PI*r*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) - 2*sin(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*cos(theta) + 2*cos(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*sin(theta) - 2*r*sin(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) -pow( PI, 2)*(-pow(r, 2) + 169/100)*(2*kappa_eps*r*cos(theta) + 2*r*cos(theta))*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta)))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta))))*sin(theta)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)) + (-1569198476435713*atan(36028797018963968*r/3242591731706757 - 36028797018963968/3242591731706757)/4503599627370496 + 20399580193664269/45035996273704960)*(-2*r*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) + PI*(-pow(r, 2) + 169/100)*(2*kappa_eps*sin(theta) + 2*sin(theta))*cos(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*cos(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))) - PI*(-pow(r, 2) + 169/100)*(-4*delta_e*r - 2*kappa_eps*cos(theta) + 2*cos(theta))*sin(PI*(2*kappa_eps*r*sin(theta) + 2*r*sin(theta)))*sin(PI*(-2*delta_e*pow(r, 2) - 2*kappa_eps*r*cos(theta) + 2*r*cos(theta))))*(pow(kappa_eps, 2) - 4*kappa_eps*pow(sin(theta), 2) + 2*kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1)/((kappa_eps + 1)*pow(2*delta_e*r*cos(theta) + kappa_eps - 1, 2)))/(r*(kappa_eps + 1)*abs(2*delta_e*r*cos(theta) + kappa_eps - 1));" - -#sol="(Rmax^2-rtheta(1)^2)*cos(2*PI*x)*sin(2*PI*y);" -#sol="pow(Rmax, 2)-rthetapow(1, 2))*cos(2*PI*x)*sin(2*PI*y);" - -print rhs -print "" - -for nb in ["2", "3", "4", "(1/2)", "(3/2)"]: - l=len(nb) - pos=rhs.find("^"+nb) - pos_par=pos - while pos != -1: - rhs = rhs[0:pos] + ", "+nb+")" + rhs[pos+l+1:] - found=0 - par=0 - first=1 - while not found: - pos = pos-1 - if not pos: - if rhs[0]=="(": - rhs = "pow"+rhs - break - else: - print "ERROR: the first character should be '('" - break - if rhs[pos]==" ": - continue - if first: - if rhs[pos] in ["(", "+", "-", "*", "/"]: - rhs=rhs[0:pos+1]+"pow("+rhs[pos+1:] - break - if rhs[pos] == ")": - rhs = rhs[0:pos]+rhs[pos+1:] - first=0 - par = par+1 - continue - if rhs[pos] == "(": - par = par-1 - print str(par) + " " + str(pos) + " " + rhs[pos-3:pos] - if not par and pos > 2 and (rhs[pos-3:pos]=="sin" or rhs[pos-3:pos]=="cos"): - rhs=rhs[0:pos-3]+"pow("+rhs[pos-3:pos_par-1]+")"+rhs[pos_par-1:] - break - if not par: - rhs=rhs[0:pos]+"pow"+rhs[pos:] - break - if rhs[pos] == ")": - par = par+1 - continue - pos=rhs.find("^"+nb) - pos_par=pos - - print(rhs) - print "" diff --git a/performance/run_gmgpolar.sh b/performance/run_gmgpolar.sh deleted file mode 100644 index 04bf56f3..00000000 --- a/performance/run_gmgpolar.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash -#SBATCH --job-name=gmgpolar-setup -#SBATCH --output=slurm-%A-setup.out -#SBATCH --error=slurm-%A-setup.err -#SBATCH -N 1 -#SBATCH -n 1 -#SBATCH -c 1 -#SBATCH -t 5 - -#fixed variables -# If Origin is chosen, the node can be set as coarse or fine. Default: Coarse. -origin_NOT_coarse=0 # origin_NOT_coarse -# Choose anisotropy in angle-direction. Default: Off. -theta_aniso=0 # theta_aniso -# Smoother 3 is our default, 13 is used for some testing, should be not used -# for production. -> TODO: Rename smoother names -smoother=3 # smoother (3,13) - -# default variables -# If origin is not a particular node of the mesh, Dirichlet boundary conditions -# can be implemented on the most inner circle -DirBC_Interior=1 # DirBC_Interior (0/1) -# Generalized radius of most inner circle. Defines if origin will be a particular node. -R0=1e-8 # r (1e-8/1e-5/1e-2) -# Generalized radius of maximum outer circle. -R=1.3 # R -# Anisotropy in radial direction. -fac_ani=3 # a -# TODO: which nr_exp and divideby2 do we want to consider? -nr_exp=4 # n - -#changing variables -mod_pk=2 # mod_pk=1: Shafranov geometry -prob=6 # Prob=7: Simulate solution (23) of Bourne et al. -alpha_coeff=2 -beta_coeff=1 - -# set to on -extrapolation=1 # E - -debug=0 -v1=1 -v2=1 -maxiter=300 -res_norm=3 -rel_red_conv=1e-11 - -nodes=1 -ranks=1 # number of MPI Ranks -cores=128 # set OpenMP Num Threads to maximum number of cores requested - -#################################### -## create grids ## -#################################### -create_grid=0 -if [ $create_grid ] -then -cd .. -mkdir -p angles_files/Rmax"$R"/aniso"$fac_ani"/ -mkdir -p radii_files/Rmax"$R"/aniso"$fac_ani"/ -# Costly function as setup as expensive and sequential. Only run once. -for divideBy2 in 0 1 2 3 4 5 6 7 8 # create different grid sizes -do - ## ATTENTION / REMARK: - ## Please note that these calls will abort/segfault as creation of grids and computation in one step - ## is not yet supported by GMGPolar. We will make this functionality available in a future commit. - ## Please ignore abort/segfault for the calls in this loop. - # mod_pk has no effect on the creation of grids as the set of (r,theta) is - # the same for all geometries, only the mapping F(r,theta) -> (x,y) changes. - ./build/gmgpolar_simulation -n $nr_exp -a $fac_ani --mod_pk 0 --DirBC_Interior $DirBC_Interior --divideBy2 $divideBy2 -r $R0 --smoother $smoother --verbose 2 --debug $debug --extrapolation $extrapolation --optimized 1 $ --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --write_radii_angles 1 --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"$divideBy2".txt" -done -fi - -echo "#!/bin/bash" > run_gmgpolar_sbatch.sh -# create a short name for your job -echo "#SBATCH --job-name=gmgpolar" >> run_gmgpolar_sbatch.sh -# Change fixed "dbt7" in file name if divideBy2 below is changed! -# stdout file %A=job id -echo "#SBATCH --output=slurm-%A-p$prob-r$nr_exp-dbt7-mpk$mod_pk-s$smoother-e$extrapolation--N$nodes-R$ranks-maxC$cores.out" >> run_gmgpolar_sbatch.sh -# stderr file -echo "#SBATCH --error=slurm-%A-p$prob-r$nr_exp-dbt7-mpk$mod_pk-s$smoother-e$extrapolation--N$nodes-R$ranks-maxC$cores.err" >> run_gmgpolar_sbatch.sh - -echo "#SBATCH -N $nodes" >> run_gmgpolar_sbatch.sh -echo "#SBATCH -n $ranks" >> run_gmgpolar_sbatch.sh -echo "#SBATCH -c $cores" >> run_gmgpolar_sbatch.sh -# fix to one thread per core -echo "#SBATCH --threads-per-core=1" >> run_gmgpolar_sbatch.sh -# fix CPU frequency to 1.8 Mhz -echo "#SBATCH --cpu-freq=1800000" >> run_gmgpolar_sbatch.sh -## Estimation on 2x AMD EPYC 7702: nr=4, dbt=7, prob=7, mpk=1 takes 720 minutes for 1->2->...->128 cores ## -echo "#SBATCH -t 1600" >> run_gmgpolar_sbatch.sh -echo "#SBATCH --exclusive" >> run_gmgpolar_sbatch.sh - -# remove potentially loaded and conflicting modules -echo "module purge" >> run_gmgpolar_sbatch.sh - -# CARO -#echo "module load rev/23.05" >> run_gmgpolar_sbatch.sh -# spack install mumps@XXX+metis~mpi -echo "module load likwid/5.2.2" >> run_gmgpolar_sbatch.sh -# Local machine -# echo "module load PrgEnv/gcc10-openmpi" >> run_gmgpolar_sbatch.sh - -# echo "cd .." >> run_gmgpolar_sbatch.sh -# echo "make -j16" >> run_gmgpolar_sbatch.sh - -echo "# potentially run benchmark on machine" >> run_gmgpolar_sbatch.sh -echo "# srun --cpus-per-task=$((cores)) likwid-bench -i 1000 -t stream_avx_fma -w S0:500MB:64" >> run_gmgpolar_sbatch.sh - -# to be defined for use case (3/4/5/6) -# Attention: divideBy is used as a dummy variable to access folders as grids are read in -echo "let divideBy2=7" >> run_gmgpolar_sbatch.sh - -#################################### -## solve system ## -#################################### - -# reduce cores as cores count from 0 -max_threads=$((cores)) -echo "let m=1" >> run_gmgpolar_sbatch.sh -# FLOPS-DP counter from 1 to cores many threads -echo "while [ \$m -le $max_threads ]; do" >> run_gmgpolar_sbatch.sh -echo "let mminus1=m-1" >> run_gmgpolar_sbatch.sh - -echo "# for testing that pin works correctly, potentially use likwid-pin beforehand" >> run_gmgpolar_sbatch.sh -echo "# srun --cpus-per-task=\$m likwid-pin -c N:0-\$mminus1 ./build/gmgpolar_simulation --openmp \$m --matrix_free 1 -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 0 -r $R0 --smoother $smoother -E $extrapolation --verbose 2 --debug $debug --optimized 1 --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --rel_red_conv $rel_red_conv" >> run_gmgpolar_sbatch.sh - -echo "srun --cpus-per-task=\$m likwid-perfctr -f -m -C 0-\$mminus1 -g FLOPS_DP ./build/gmgpolar_simulation --openmp \$m --matrix_free 1 -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 0 -r $R0 --smoother $smoother -E $extrapolation --verbose 2 --debug $debug --optimized 1 --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --rel_red_conv $rel_red_conv" >> run_gmgpolar_sbatch.sh -echo "let m=m*2" >> run_gmgpolar_sbatch.sh -echo "done;" >> run_gmgpolar_sbatch.sh - -# # Memory (saturation) benchmarks -echo "let m=1" >> run_gmgpolar_sbatch.sh -echo "while [ \$m -le $max_threads ]; do" >> run_gmgpolar_sbatch.sh -echo "let mminus1=m-1" >> run_gmgpolar_sbatch.sh -echo "srun --cpus-per-task=\$m likwid-perfctr -f -m -C 0-\$mminus1 -g MEM_DP ./build/gmgpolar_simulation --openmp \$m --matrix_free 1 -n $nr_exp -a $fac_ani --mod_pk $mod_pk --DirBC_Interior $DirBC_Interior --divideBy2 0 -r $R0 --smoother $smoother -E $extrapolation --verbose 2 --debug $debug --optimized 1 --v1 $v1 --v2 $v2 -R $R --prob $prob --maxiter $maxiter --alpha_coeff $alpha_coeff --beta_coeff $beta_coeff --res_norm $res_norm --f_grid_r "radii_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --f_grid_theta "angles_files/Rmax"$R"/aniso"$fac_ani"/divide"\$divideBy2".txt" --rel_red_conv $rel_red_conv" >> run_gmgpolar_sbatch.sh -echo "let m=m*2" >> run_gmgpolar_sbatch.sh -echo "done;" >> run_gmgpolar_sbatch.sh - -#submit the job -sbatch run_gmgpolar_sbatch.sh \ No newline at end of file diff --git a/plot_culham.py b/plot_culham.py deleted file mode 100644 index 3014caf7..00000000 --- a/plot_culham.py +++ /dev/null @@ -1,37 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -r, q, x, y, phi = np.loadtxt('out.txt', unpack=True) -with open('out.txt') as fl: - comment = fl.readline() -words = comment.split() -nr = int(words[3]) -ntheta = int(words[6]) -x = x.reshape(nr,ntheta) -y = y.reshape(nr,ntheta) -phi = phi.reshape(nr,ntheta) - -x = np.concatenate((x, x[:, 0, np.newaxis]), axis=1) -y = np.concatenate((y, y[:, 0, np.newaxis]), axis=1) -phi = np.concatenate((phi, phi[:, 0, np.newaxis]), axis=1) - -fig, ax = plt.subplots(1,1) -clevels = np.linspace( phi.min(), phi.max(), 101) -im = ax.contourf( x, y, phi, clevels, cmap='seismic' ) -for c in im.collections: - c.set_edgecolor('face') -plt.colorbar( im ) - -n1 = nr//8 -ax.plot( x[:,::n1], y[:,::n1], '-', color='lightgrey', lw=0.5 ) -ax.plot( x[:,nr-1], y[:,nr-1], '-', color='lightgrey', lw=0.5 ) -ax.plot( x.transpose()[:,::n1], y.transpose()[:,::n1], '-', color='lightgrey', lw=0.5 ) -# style -ax.set_xlabel( r'$x$' ) -ax.set_ylabel( r'$y$' ) -#ax.set_title( r'Numerical solution: $\phi(x1,x2)$' ) -ax.set_aspect( 'equal' ) -fig.tight_layout() - -plt.show() - diff --git a/plot_tools/lskkr23_plot_benchmarks_strong_scaling.py b/plot_tools/lskkr23_plot_benchmarks_strong_scaling.py deleted file mode 100644 index 84be55b6..00000000 --- a/plot_tools/lskkr23_plot_benchmarks_strong_scaling.py +++ /dev/null @@ -1,188 +0,0 @@ -import pandas as pd -import numpy as np -import sys -# Use backend to not plot on UI -# import matplotlib -# matplotlib.use('Agg') -import matplotlib.pyplot as plt -from os.path import join, exists, dirname -from os import makedirs -import os.path - -### Plots scaling of FLOPS and Caches (saturation) scaling from 0 to n Cores -### as read from data frame - -colors = [ - [1.00, 0.49, 0.06], - [0.17, 0.63, 0.18], - [0.83, 0.15, 0.16], - [0.13, 0.47, 0.69], - [0.58, 0.40, 0.74], - [0.53, 0.35, 0.27], - [0.92, 0.46, 0.77], - [0.50, 0.50, 0.50], - [0.66, 0.85, 0.06], - [0.06, 0.85, 0.85], - [0.85, 0.15, 0.85], - [0.75, 0.75, 0.75], - [0.80, 0.67, 0.00], - [0.30, 0.65, 1.00], - [0.40, 0.07, 0.00], - [1.00, 0.80, 0.87], - [1.00, 0.87, 0.20], - [1.00, 0.80, 0.70], - [0.80, 0.87, 1.00]]; - -def plot_scaling(path_out, fname, benchname, df, title, ylabel, saturation_limit=0, logplot = True, colors=colors): - ''' - Plot different timings or other benchmarks against the number of cores used. - @param path_out Path to output files. - @param fname First part of filename. - @param benchname Benchmark name and postfix for filename. - @param df Data frame with results per core scaling. - @param title Plot title. - @param ylabel Y-axis label. - @param saturation_limit Saturation limit to be plotted for MEM_DP scaling. - ''' - fontsize = 24 - - fig = plt.figure(figsize=(12, 10)) - # fig.subplots_adjust(bottom=0.3) # use for interactive plotting, for savefig, legend+figure is adjusted with bbox_inches='tight' - ax = fig.add_subplot() - start_optimal_line = df.loc[0,[timer for timer in df.iloc[:,1:].columns if 'Total' in timer]].max() - optimal_line = 1.0/df['Cores'].values * start_optimal_line - if logplot: - if benchname == 'Timings': - plt.loglog(df['Cores'], optimal_line, linewidth=2, linestyle='dashed', color='black', label='Optimal') - for i in range(len(df.iloc[:,1:].columns)): - col_label = df.columns[i+1] - col_label = col_label.replace('Computing residual on finest level', 'Computing residual (finest)') - col_label = col_label.replace('Applying prolongation (+ coarse grid correction)', 'Applying prolongation (+ CGC)') - plt.loglog(df['Cores'], df.iloc[:,i+1], linewidth=2, label=col_label, color=colors[i]) # Cores is assumed to be in first column - else: - if benchname == 'Timings': - plt.plot(df['Cores'], optimal_line, linewidth=2, linestyle='dashed', color='black', label='Optimal') - for i in range(len(df.iloc[:,1:].columns)): - col_label = df.columns[i+1] - col_label = col_label.replace('Computing residual on finest level', 'Computing residual (finest)') - col_label = col_label.replace('Applying prolongation (+ coarse grid correction)', 'Applying prolongation (+ CGC)') - plt.plot(df['Cores'], df.iloc[:,i+1], linewidth=2, label=col_label, color=colors[i]) # Cores is assumed to be in first column - - if benchname == 'MEM_DP': - if saturation_limit > 0: - plt.plot(df['Cores'], saturation_limit * np.ones(len(df['Cores'])), linestyle='dotted', linewidth=3, color=[0, 0, 0]) - ax.text(1, saturation_limit + 3, 'Memory bandwith (AXPY) (' + str(saturation_limit) + ' GBytes/s)', fontsize=14) - ax.set_ylim(0, saturation_limit + 10) - - ax.legend(bbox_to_anchor=(0, 0, 1, -0.1), mode="expand", ncols=2, fontsize=fontsize-6) - # ax.set_title(title, fontsize=fontsize+6) - ax.set_ylabel(ylabel, fontsize=fontsize) - ax.set_xlabel('Number of cores', fontsize=fontsize) - ax.set_xticks(df['Cores']) - ax.set_xticklabels(df['Cores']) - - plt.rcParams['xtick.labelsize']=fontsize-6 - plt.rcParams['ytick.labelsize']=fontsize-6 - - path_out = join(path_out, 'figures') - if not exists(path_out): - makedirs(path_out) - plt.savefig(join(path_out, fname + '_' + benchname.lower()), dpi=300, bbox_inches='tight') - # plt.show() - plt.close() - - -def main(benchmarks=['FLOPS_DP'], problem=6, divideBy2=7, mod_pk=1, maxCores=128): - # maxCores simulated in scaling - - file_prefix = 'caro-paper' # provide correct slurm job id - if file_prefix != '': - file_prefix = file_prefix + '-' - file_postfix = '' - if file_postfix != '': - file_postfix = '-' + file_postfix - nr_exp = 4 - smoother = 3 - extrapolation = 1 - - nodes = 1 - ranks = 1 - - maxCoresPlot = 64 # maxCores to plot - plot_counter = {} # dict on which counter to plot - plot_counter['Total setup'] = 0 - plot_counter['Building system matrix A and RHS'] = 0 - plot_counter['Factorization of coarse operator Ac'] = 0 - plot_counter['Building intergrid operators (e.g. projections)'] = 0 - plot_counter['Building smoothing operators A_sc'] = 0 - plot_counter['Factorizing smoothing operators A_sc'] = 0 - plot_counter['Total multigrid cycle'] = 1 - plot_counter['Complete smoothing'] = 1 - plot_counter['Computing residual'] = 1 - plot_counter['Applying restriction'] = 1 - plot_counter['Solve coarse system'] = 1 - plot_counter['Applying prolongation (+ coarse grid correction)'] = 1 - plot_counter['Computing residual on finest level'] = 1 - plot_counter['Computing final error'] = 0 - plot_counter['Total application of A'] = 1 - plot_counter['Evaluation of arr, art, and att'] = 0 - plot_counter['Evaluation of alpha and beta'] = 0 - plot_counter['Computing determinant of Jacobian of inverse mapping'] = 0 - plot_counter['Computing exact solution'] = 0 - plot_counter['Total execution time'] = 0 - - plot_regions = {} # dict on which likwid region to plot - plot_regions['Setup'] = 1 - plot_regions['Iteration'] = 1 - - bench_to_unit = {} - bench_to_unit['FLOPS_DP'] = 'MFLOP/s' - bench_to_unit['MEM_DP'] = 'MBytes/s' - - ## saturation_limit for MEM_DP scaling (node specific and needs to be adapted). - saturation_limit = 80 - - fname = file_prefix + 'p' + str(problem) + '-r' + str(nr_exp) + '-dbt' + str(divideBy2) + '-mpk' + str(mod_pk) + '-s' + str( - smoother) + '-e' + str(extrapolation) + '--N' + str(nodes) + '-R' + str(ranks) + '-maxC' + str(maxCores) + file_postfix - - path_to_files_rel = os.path.join('..', os.path.join('..', 'scaling_output')) # relative from read_output call - path_to_files = os.path.join(os.path.dirname(__file__), os.path.join(path_to_files_rel)) - - - # Problem setting columns - setting_cols = ['Problem', 'rExp', 'divB2', 'ModPK', 'Extrapolation', 'Nodes', 'Ranks'] - - - df = [] - for bench in benchmarks: - df.append(pd.read_csv( - join(path_to_files, fname + '_' + bench + '.csv'), - dtype={'Problem': int, 'rExp': int, 'divB2': int, 'ModPK': int, - 'Extrapolation': int, 'Nodes': int, 'Ranks': int, - 'Cores': int, 'its': int})) - - # Check that the different number of threads/cores where only conducted - # on one particular setting of the above columns - if np.max(df[0].loc[:,setting_cols].nunique()) > 1: - sys.exit('Error in input data, more than one setting found.') - # check that only one row per number of cores is available - if df[0]['Cores'].nunique() != len(df[0]['Cores']): - sys.exit('Error: Multiple times computed with the same number of cores.') - - # check content - for i in range(len(df)): - # plot timings - plot_scaling(path_to_files, fname, 'Timings', df[i].loc[df[i]['Cores']<=maxCoresPlot, ['Cores'] + [k for k, v in plot_counter.items() if v==1]], 'Strong scaling of GMGPolar', 'Time (sec)') - # plot likwid benchmark - plot_scaling(path_to_files, fname, benchmarks[i], df[i].loc[df[i]['Cores']<=maxCoresPlot, ['Cores'] + [col for col in df[i].columns if bench_to_unit[benchmarks[i]] in col]], 'Strong scaling of GMGPolar', bench_to_unit[benchmarks[i]]) - - -if __name__ == '__main__': - # strong scaling - main(benchmarks=['FLOPS_DP', 'MEM_DP'], problem=6, divideBy2=7, mod_pk=1) - main(benchmarks=['FLOPS_DP', 'MEM_DP'], problem=6, divideBy2=7, mod_pk=2) - main(benchmarks=['FLOPS_DP', 'MEM_DP'], problem=7, divideBy2=7, mod_pk=1) - main(benchmarks=['FLOPS_DP', 'MEM_DP'], problem=7, divideBy2=7, mod_pk=2) - # large case strong scaling - main(benchmarks=['FLOPS_DP'], problem=7, divideBy2=8, mod_pk=1, maxCores=64) - \ No newline at end of file diff --git a/plot_tools/lskkr23_plot_sol_coeff_compute_flops.ipynb b/plot_tools/lskkr23_plot_sol_coeff_compute_flops.ipynb deleted file mode 100644 index f3fcf599..00000000 --- a/plot_tools/lskkr23_plot_sol_coeff_compute_flops.ipynb +++ /dev/null @@ -1,277 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "import matplotlib.pyplot as plt\n", - "from matplotlib.colors import LogNorm\n", - "import matplotlib.ticker as ticker\n", - "\n", - "# Define the curvilinear mapping\n", - "def xymap(r, t, mod_pk=1, par1=0.3, par2=0.2, x0=0, y0=0):\n", - " if mod_pk == 0:\n", - " x = r*np.cos(t)\n", - " y = r*np.sin(t)\n", - " elif mod_pk == 1:\n", - " kappa=par1\n", - " delta=par2\n", - " x = x0 + (1-kappa)*r*np.cos(t)-delta*r*r\n", - " y = y0 + (1+kappa)*r*np.sin(t)\n", - " elif mod_pk == 2:\n", - " epsilon=par1\n", - " lambdaa=par2\n", - " sq = np.sqrt(1+epsilon*(epsilon+2*r*np.cos(t)))\n", - " ksi = 1/np.sqrt(1-epsilon*epsilon/4)\n", - " x = (1/epsilon)*(1-sq)\n", - " y = y0 + lambdaa*ksi*r*np.sin(t)/(2-sq)\n", - " return x, y\n", - "\n", - "# Define the 2D function\n", - "def func(r, t, x, y, prob=6, mod_pk=1, C=1, Rmax=1, m=1):\n", - " if prob==6:\n", - " f=C*np.power(r/Rmax, 6)*np.power(r/Rmax-1, 6)*np.cos(m*t)\n", - " elif prob==7:\n", - " f=C*np.power(1+r/Rmax, 6)*np.power(1-r/Rmax, 6)*np.cos(2*np.pi*x)*np.sin(2*np.pi*y)\n", - " return f\n", - "\n", - "# Format numbers in scientific format\n", - "def fmt(x, pos):\n", - " # a, b = '{:.2e}'.format(x).split('e')\n", - " a, b = '{:.0e}'.format(x).split('e')\n", - " b = int(b)\n", - " return r'${} \\times 10^{{{}}}$'.format(a, b)\n", - "\n", - "PROB=6\n", - "MOD_PK=1\n", - "C = 2**12 * 10**(-4)\n", - "M = 11\n", - "RMIN = 1e-5\n", - "RMAX = 1.3\n", - "KAPPA=0.3\n", - "DELTA=0.2\n", - "EPSILON=0.3\n", - "LAMBDA=1.4\n", - "\n", - "fontsize=18\n", - "\n", - "# Generate x and y values\n", - "N_INT = 1000\n", - "r = np.linspace(RMIN, RMAX, N_INT)\n", - "t = np.linspace(0, 2*np.pi, N_INT)\n", - "\n", - "# Create a meshgrid from x and y\n", - "R, T = np.meshgrid(r, t)\n", - "\n", - "for PROB in [6, 7]:\n", - " print(\"Prob:\",PROB)\n", - " for MOD_PK in [0,1,2]:\n", - " print(\"Geometry:\",MOD_PK)\n", - " if MOD_PK == 1:\n", - " par1=KAPPA\n", - " par2=DELTA\n", - " elif MOD_PK == 2:\n", - " par1=EPSILON\n", - " par2=LAMBDA\n", - " else:\n", - " par1=0\n", - " par2=0\n", - " \n", - " # Evaluate the function values for each point in the meshgrid\n", - " X, Y = xymap(R, T, mod_pk=MOD_PK, par1=par1, par2=par2)\n", - " Z = func(R, T, X, Y, prob=PROB, mod_pk=MOD_PK, C=C, Rmax=RMAX, m=M)\n", - " # print(\"X:\",np.min(X),np.max(X))\n", - " # print(\"Y:\",np.min(Y),np.max(Y))\n", - " # print(\"Z:\",np.min(Z),np.max(Z))\n", - "\n", - " # Plot the 2D function with logarithmic color scale\n", - " plt.contourf(X, Y, Z, cmap='coolwarm',levels=np.linspace(Z.min(),Z.max(),100))\n", - "\n", - " # Set limits on the x and y axes\n", - " if MOD_PK == 0:\n", - " plt.xlim(-1.4, 1.4)\n", - " plt.ylim(-1.4, 1.4)\n", - " elif MOD_PK == 1:\n", - " plt.xlim(-1.4, 0.7)\n", - " plt.ylim(-1.8, 1.8)\n", - " elif MOD_PK == 2:\n", - " plt.xlim(-1.4, 1.6)\n", - " plt.ylim(-2.2, 2.2)\n", - "\n", - " # Add colorbar\n", - " cbar = plt.colorbar() #format=ticker.FuncFormatter(fmt))\n", - " # format=ticker.ScalarFormatter()\n", - " # cbar.set_label('Solution')\n", - "\n", - " # Set equal aspect ratio for the plot\n", - " plt.gca().set_aspect('equal', adjustable='box')\n", - "\n", - " # Add labels and title\n", - " # plt.xlabel('X-axis')\n", - " # plt.ylabel('Y-axis')\n", - " # plt.title('2D Function with Logarithmic Color Scale')\n", - " \n", - " #plt.grid()\n", - " plt.rcParams['xtick.labelsize']=fontsize-4\n", - " plt.rcParams['ytick.labelsize']=fontsize-4 \n", - " \n", - " # Save figure\n", - " plt.savefig('sol_prob-'+str(PROB)+'_geom-'+str(MOD_PK)+'.png', bbox_inches='tight', dpi=300)\n", - "\n", - " # Show the plot\n", - " plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "import matplotlib.pyplot as plt\n", - "\n", - "# Define the 1D functions\n", - "def alpha(r, Rmax=1.3, rp=0.7, deltar=0.05):\n", - " return np.exp(-np.tanh(((r/Rmax)-rp)/deltar))\n", - "\n", - "def beta(r, Rmax=1.3, rp=0.7, deltar=0.05):\n", - " return 1/alpha(r, Rmax=Rmax, rp=rp, deltar=deltar)\n", - "\n", - "RMIN=1e-5\n", - "RMAX=1.3\n", - "RP=0.7\n", - "DELTAR=0.05\n", - "\n", - "fontsize=18\n", - "\n", - "# Generate x values\n", - "r = np.linspace(RMIN, RMAX, 100)\n", - "\n", - "# Evaluate the function values\n", - "alpha_r = alpha(r, Rmax=RMAX, rp=RP, deltar=DELTAR)\n", - "beta_r = beta(r, Rmax=RMAX, rp=RP, deltar=DELTAR)\n", - "print(\"ALPHA:\",np.min(alpha_r),np.max(alpha_r))\n", - "print(\"BETA:\",np.min(beta_r),np.max(beta_r))\n", - "\n", - "# Plot the functions on the same plot\n", - "plt.plot(r, alpha_r, label='α(r)', linewidth=3)\n", - "plt.plot(r, beta_r, label='β(r)', linewidth=3)\n", - "\n", - "# Add labels and title\n", - "plt.xlabel('r', fontsize=fontsize)\n", - "\n", - "# Add a legend\n", - "plt.legend(fontsize=fontsize)\n", - " \n", - "#plt.grid()\n", - "plt.rcParams['xtick.labelsize']=fontsize-4\n", - "plt.rcParams['ytick.labelsize']=fontsize-4\n", - "\n", - "# Save figure\n", - "plt.savefig('coeff.png', bbox_inches='tight', dpi=300)\n", - "\n", - "# Show the plot\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "def flops_comp(nr, nt, m_c, it, mod_pk):\n", - " m = nr*nt\n", - " mu_c = m_c/m\n", - " # print(\"m\",m,\"m_c\",m_c,\"mu_c\",mu_c)\n", - " v1=1\n", - " v2=1\n", - " \n", - " # GLOBAL\n", - " if mod_pk == 0:\n", - " flops_DF = 6\n", - " elif mod_pk == 1:\n", - " flops_DF = 18\n", - " elif mod_pk == 2:\n", - " flops_DF = 112\n", - "\n", - " # SETUP\n", - " ## Flops\n", - " flops_setup_smoother_m = 2*flops_DF + 70 + 7*mu_c\n", - " flops_setup_m = 4/3*flops_setup_smoother_m\n", - " # print(\"flops_setup_m\",flops_setup_m)\n", - " \n", - " flops_setup = flops_setup_m * m\n", - " ## Mem\n", - " mem_setup_m = 3 + 2*mu_c\n", - " # print(\"mem_setup_m\",mem_setup_m)\n", - " \n", - " mem_setup = mem_setup_m * m\n", - " \n", - " # MG\n", - " ## Flops\n", - " flops_smoother_m = 2*flops_DF + 80 + 4*mu_c\n", - " flops_residual_m = flops_DF + 107.25\n", - " flops_m = (4*it)*((v1+v2)*flops_smoother_m + flops_residual_m)/3\n", - " # print(\"flops_m\",flops_m)\n", - " \n", - " flops = flops_m * m\n", - " ## Mem\n", - " mem_smoother_m = 2\n", - " mem_residual_m = 3\n", - " mem_m = 4*(mem_smoother_m + mem_residual_m)/3\n", - " # print(\"mem_m\",mem_m)\n", - " \n", - " mem = mem_m * m\n", - " \n", - " return flops_setup, mem_setup, flops, mem\n", - " \n", - " \n", - "MOD_PK=1\n", - "nr = [769, 1537, 3073, 6145]\n", - "nt = [1024, 2048, 4096, 8192]\n", - "m_c = [161, 321, 641, 1281]\n", - "it = [[70, 67, 64, 61], [56, 54, 51, 49]] # MOD_PK 1, MOD_PK 2\n", - "for MOD_PK in [1, 2]:\n", - " print(\"MOD_PK: \",MOD_PK)\n", - " print(\"nr,nt,m,m_c,it,flops_setup,mem_setup,flops,mem\")\n", - " for i in range(len(nr)):\n", - " flops_setup, mem_setup, flops, mem = flops_comp(nr[i], nt[i], m_c[i], it[MOD_PK-1][i], MOD_PK)\n", - " print(nr[i],\",\",nt[i],\",\",\"{:.2e}\".format(nr[i]*nt[i]),\",\",m_c[i],\",\",it[MOD_PK-1][i],\",\",\"{:.2e}\".format(flops_setup),\",\",\"{:.2e}\".format(mem_setup),\",\",\"{:.2e}\".format(flops),\",\",\"{:.2e}\".format(mem))\n", - " print(\"\\n\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.7" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/plot_tools/lskkr23_plot_weak_scaling.py b/plot_tools/lskkr23_plot_weak_scaling.py deleted file mode 100644 index 6c463aa7..00000000 --- a/plot_tools/lskkr23_plot_weak_scaling.py +++ /dev/null @@ -1,119 +0,0 @@ -import pandas as pd -import numpy as np -import sys -# Use backend to not plot on UI -# import matplotlib -# matplotlib.use('Agg') -import matplotlib.pyplot as plt -from os.path import join, exists, dirname -from os import makedirs -import os.path - - -# This file has been written and used to plot the read weak scaling results for -# Leleux, Schwarz, Kühn, Kruse, Rüde - Complexity analysis and scalability of a matrix-free extrapolated geometric multigrid (2023) -# In contrast to the other files with prefix lskkr23_*, it is written quick and dirty and only -# for weak scaling data collected from different strong scaling experiments. - -colors = [ - [1.00, 0.49, 0.06], - [0.17, 0.63, 0.18], - [0.83, 0.15, 0.16], - [0.13, 0.47, 0.69], - [0.58, 0.40, 0.74], - [0.53, 0.35, 0.27], - [0.92, 0.46, 0.77], - [0.50, 0.50, 0.50], - [0.66, 0.85, 0.06], - [0.06, 0.85, 0.85], - [0.85, 0.15, 0.85], - [0.75, 0.75, 0.75], - [0.80, 0.67, 0.00], - [0.30, 0.65, 1.00], - [0.40, 0.07, 0.00], - [1.00, 0.80, 0.87], - [1.00, 0.87, 0.20], - [1.00, 0.80, 0.70], - [0.80, 0.87, 1.00]]; - -def plot_weak_scaling(path_out, fname, df, ylabel, logplot = True, colors=colors): - ''' - Plot different timings or other benchmarks against the number of cores used. - @param path_out Path to output files. - @param fname First part of filename. - @param df Data frame with results per core scaling. - @param ylabel Y-axis label. - ''' - fontsize = 24 - - fig = plt.figure(figsize=(12, 10)) - # fig.subplots_adjust(bottom=0.3) # use for interactive plotting, for savefig, legend+figure is adjusted with bbox_inches='tight' - ax = fig.add_subplot() - start_plot = list(df.columns).index('Total multigrid cycle') - start_optimal_line = df.loc[0,[timer for timer in df.iloc[:,start_plot:].columns if 'Total' in timer]].max() - optimal_line = [start_optimal_line for i in df['Cores'].values] - if logplot: - plt.loglog(df['Cores'], optimal_line, linewidth=2, linestyle='dashed', color='black', label='Optimal') - for i in range(len(df.iloc[:,start_plot:].columns)): - col_label = df.columns[start_plot+i] - col_label = col_label.replace('Computing residual on finest level', 'Computing residual (finest)') - col_label = col_label.replace('Applying prolongation (+ coarse grid correction)', 'Applying prolongation (+ CGC)') - plt.loglog(df['Cores'], df.iloc[:,start_plot+i], linewidth=2, label=col_label, color=colors[i]) # Cores is assumed to be in first column - else: - plt.plot(df['Cores'], optimal_line, linewidth=2, linestyle='dashed', color='black', label='Optimal') - for i in range(len(df.iloc[:,start_plot:].columns)): - col_label = df.columns[start_plot+i] - col_label = col_label.replace('Computing residual on finest level', 'Computing residual (finest)') - col_label = col_label.replace('Applying prolongation (+ coarse grid correction)', 'Applying prolongation (+ CGC)') - plt.plot(df['Cores'], df.iloc[:,start_plot+i], linewidth=2, label=col_label, color=colors[i]) # Cores is assumed to be in first column - - - ax.legend(bbox_to_anchor=(0, 0, 1, -0.1), mode="expand", ncols=2, fontsize=fontsize-6) - # ax.set_title(title, fontsize=fontsize+6) - ax.set_ylabel(ylabel, fontsize=fontsize) - ax.set_xlabel('Number of cores', fontsize=fontsize) - ax.set_xticks(df['Cores']) - ax.set_xticklabels(df['Cores']) - - plt.rcParams['xtick.labelsize']=fontsize-6 - plt.rcParams['ytick.labelsize']=fontsize-6 - - path_out = join(path_out, 'figures') - if not exists(path_out): - makedirs(path_out) - plt.savefig(join(path_out, fname), dpi=300, bbox_inches='tight') - # plt.show() - plt.close() - - -def main(problem=7, divideBy2=[4, 5, 6, 7], mod_pk=1): - - file_prefix = 'caro-paper-weakscaling' - if file_prefix != '': - file_prefix = file_prefix + '-' - file_postfix = 'C1toC64_FLOPSDP' - if file_postfix != '': - file_postfix = '-' + file_postfix - nr_exp = 4 - smoother = 3 - extrapolation = 1 - - nodes = 1 - ranks = 1 - - path_to_perf_files_rel = os.path.join('..', os.path.join('..', 'scaling_output')) # relative from read_output call - path_to_perf_files = os.path.join(os.path.dirname(__file__), os.path.join(path_to_perf_files_rel)) - - filename_input = 'p' + str(problem) + '-r' + str(nr_exp) + '-dbt' + str(divideBy2[0]) + '-' + str(divideBy2[-1]) + '-mpk' + str(mod_pk) + '-s' + str( - smoother) + '-e' + str(extrapolation) + '--N' + str(nodes) + '-R' + str(ranks) - - try: # allow deletion of empty error files - df_weak = pd.read_csv(os.path.join(path_to_perf_files, file_prefix + filename_input + file_postfix + '.csv'), sep=';') - - plot_weak_scaling(path_to_perf_files, file_prefix + filename_input + file_postfix, df_weak.iloc[:, list(df_weak.columns).index('Cores'):], 'Time (sec)') - except FileNotFoundError: - err = 0 # no error file = no error - -if __name__ == "__main__": - # weak scaling - main(problem=7, divideBy2=[4,5,6,7], mod_pk=2) \ No newline at end of file diff --git a/plot_tools/lskkr23_read_output_strong_scaling.py b/plot_tools/lskkr23_read_output_strong_scaling.py deleted file mode 100644 index 92ab41d4..00000000 --- a/plot_tools/lskkr23_read_output_strong_scaling.py +++ /dev/null @@ -1,225 +0,0 @@ -import pandas as pd -import numpy as np -import os -import sys - -# This file has been written and used to read the results for -# Leleux, Schwarz, Kühn, Kruse, Rüde - Complexity analysis and scalability of a matrix-free extrapolated geometric multigrid (2023) -def main(problem=6, divideBy2=7, mod_pk=1): - - file_prefix = 'caro-paper' - if file_prefix != '': - file_prefix = file_prefix + '-' - file_postfix = '' - if file_postfix != '': - file_postfix = '-' + file_postfix - nr_exp = 4 - smoother = 3 - extrapolation = 1 - - nodes = 1 - ranks = 1 - maxCores = 64# 128 - cores_used = [] # will be filled automatically - - path_to_perf_files_rel = os.path.join('..', os.path.join('..', 'scaling_output')) # relative from read_output call - path_to_perf_files = os.path.join(os.path.dirname(__file__), os.path.join(path_to_perf_files_rel)) - - cols_problem = ['Problem', 'rExp', 'divB2', 'ModPK', 'Extrapolation'] - - cols_cluster = ['Nodes', 'Ranks', 'Cores'] - - cols_convergence = ['its', '2-norm of error', 'inf-norm of error'] - - cols_time = [] - cols_time += ['Total setup', 'Building system matrix A and RHS', 'Factorization of coarse operator Ac', - 'Building intergrid operators (e.g. projections)', 'Building smoothing operators A_sc', - 'Factorizing smoothing operators A_sc'] - cols_time += ['Total multigrid cycle', 'Complete smoothing', 'Computing residual', - 'Applying restriction', 'Solve coarse system', 'Applying prolongation (+ coarse grid correction)'] - cols_time += ['Computing residual on finest level', 'Computing final error', 'Total application of A'] - cols_time += ['Evaluation of arr, art, and att', 'Evaluation of alpha and beta', 'Computing determinant of Jacobian of inverse mapping', - 'Computing exact solution'] - cols_time += ['Total execution time'] - - cols = cols_problem + cols_cluster + cols_convergence + cols_time - cols_dtypes = {col: 'int' for col in cols_problem + cols_cluster} - cols_dtypes.update( - {col: 'double' for col in cols_convergence + cols_time}) - - filename_input = 'p' + str(problem) + '-r' + str(nr_exp) + '-dbt' + str(divideBy2) + '-mpk' + str(mod_pk) + '-s' + str( - smoother) + '-e' + str(extrapolation) + '--N' + str(nodes) + '-R' + str(ranks) + '-maxC' + str(maxCores) - - err = 0 - regions = {} # Attention: We assume all benchmarks in one file to be run with the same regions (output)! - search_terms_likwid = {} - search_terms_likwid['FLOPS_DP'] = 'DP [MFLOP/s]' - search_terms_likwid['MEM_DP'] = 'Memory bandwidth [MBytes/s]' - benchmarks = [] - - try: # allow deletion of empty error files - with open(os.path.join(path_to_perf_files, file_prefix + filename_input + file_postfix + '.err')) as f: - line = f.readline() - while line and err == 0: - line = f.readline() - if ' error' in line: - err = 1 - print('Error in job script.\n') - print(line) - except FileNotFoundError: - err = 0 # no error file = no error - - if err == 0: - with open(os.path.join(path_to_perf_files, file_prefix + filename_input + file_postfix + '.out')) as f: - - lines = f.readlines() - i = 0 - while i < len(lines)-1: - - # search for next program execution - if '--> Iteration' in lines[i]: - while '--> Iteration' in lines[i] and '--> Iteration' in lines[i+1]: - i = i+1 - if i > len(lines)-1: - sys.exit( - 'End of file reached without finding output.') - # iteration scheme ended: - # split on empty spaces and take number of iterations in third place - its = int(lines[i].split()[2][:-1]) - while '-norm' not in lines[i]: - i = i+1 - if i > len(lines)-1: - sys.exit( - 'End of file reached without finding output.') - norm2 = -1 - if '2-norm' in lines[i]: - norm2 = float(lines[i].split()[-1]) - else: - sys.exit('Error. 2-Norm information not available.') - norminf = -1 - if 'inf-norm' in lines[i+1]: - norminf = float(lines[i+1].split()[-1]) - else: - sys.exit('Error. Inf-Norm information not available.') - - while 'Total setup' not in lines[i]: - i = i+1 - if i > len(lines)-1: - sys.exit( - 'End of file reached without finding timing output.') - # global time print out, split line by line of information and add to dataframe - time_dict = dict() - while 'Total execution time' not in lines[i-1]: - timings = lines[i].split(':') # here we split the timers based on empty spaces - # convert timing to floating point - if len(timings) > 1: - time_dict[timings[0].replace('\t', '')] = float(timings[1]) - i = i+1 - if i > len(lines)-1: - sys.exit( - 'End of file reached without finding output.') - - multi_region_run = True - while multi_region_run: # iterate over potentially multiple LIKWID regions - - while 'Group 1: ' not in lines[i]: # iterate until LIKWID output - i = i+1 - if 'Number of OpenMP threads:' in lines[i] or (i == len(lines)-1): - multi_region_run = False - break - elif i > len(lines)-1: - sys.exit( - 'End of file reached without finding output.') - if not multi_region_run: - break - benchmark_line = lines[i].split() - if 'Region' in lines[i]: - rg = benchmark_line[1].replace(',', '') - regions[rg] = 0 - else: - multi_region_run = False - benchmark = benchmark_line[-1] - - # save dataframe for previous benchmark (if there was) and create dataframe for current (new) benchmark - if benchmark not in benchmarks: - if len(benchmarks) > 0: - perf_results_df.to_csv( - os.path.join(path_to_perf_files, - file_prefix + filename_input + file_postfix + '_' + benchmarks[-1] + '.csv'), - index=False) - - benchmarks.append(benchmark) - # create empty data frame from column set - perf_results_df = pd.DataFrame(columns=cols) - # set data types for new data frame as defined above - for k, v in cols_dtypes.items(): - perf_results_df[k] = perf_results_df[k].astype(v) - - # number of LIKWID outputs gives number of used cores - cores = str.count(lines[i+2], 'HWThread') - - cores_used.append(cores) - - search_postfix = '' - if cores > 1: - search_postfix = ' STAT' - - while all([val + search_postfix not in lines[i] for val in search_terms_likwid.values()]): - i = i+1 - if i > len(lines)-1: - sys.exit( - 'End of file reached without finding output.') - - # extract benchmark result - regions[rg] = float(lines[i].split('|')[2].split()[0]) - - # with the number of used cores determined, check if - # line for this result is already present - row_setting_avail = ( - perf_results_df[cols_problem[0]] == problem) & ( - perf_results_df[cols_problem[1]] == nr_exp) & ( - perf_results_df[cols_problem[2]] == divideBy2) & ( - perf_results_df[cols_problem[3]] == mod_pk) & ( - perf_results_df[cols_cluster[0]] == nodes) & ( - perf_results_df[cols_cluster[1]] == ranks) & ( - perf_results_df[cols_cluster[2]] == cores) - - if row_setting_avail.values.sum() <= 1: # add new line - # add to all rows fix identifiers for: - # problem, exponent in r, modified coordinates, extrapolation - # number of nodes and ranks of the job - # as well as variable numbers for other columns - benchmark_unit = search_terms_likwid[benchmarks[-1]].split('[')[1][:-1] - perf_results_df.loc[len(perf_results_df.index), - cols_problem + cols_cluster + - cols_convergence + [reg + ' (' + benchmark_unit + ')' for reg in regions.keys()]] = [ - problem, nr_exp, divideBy2, mod_pk, extrapolation, - nodes, ranks, cores, its, norm2, norminf] + list(regions.values()) - # add timings - for time_col, time_val in time_dict.items(): - perf_results_df.loc[len( - perf_results_df.index)-1, time_col] = time_val - elif row_setting_avail.values.sum() > 1: # error - sys.exit( - 'Error. More than two lines corresponds to criterion.' - '\n\tTwo benchmarks for the exact same setting in output. Please check output file.') - - i += 1 - # end while - - # save file of last benchmark - perf_results_df.to_csv( - os.path.join(path_to_perf_files, - file_prefix + filename_input + file_postfix + '_' + benchmarks[-1] + '.csv'), - index=False) - # close file - - -if __name__ == "__main__": - # strong scaling - main(problem=6, divideBy2=7, mod_pk=1) - main(problem=6, divideBy2=7, mod_pk=2) - main(problem=7, divideBy2=7, mod_pk=1) - main(problem=7, divideBy2=7, mod_pk=2) - # large case strong scaling - main(problem=7, divideBy2=8, mod_pk=1) \ No newline at end of file diff --git a/print_tables.py b/print_tables.py deleted file mode 100644 index 6c35991b..00000000 --- a/print_tables.py +++ /dev/null @@ -1,157 +0,0 @@ -import glob -import os -import h5py -import numpy as np - -class Result: - def __init__(self, n1, n2, levels, iterations, rho, resid, l2, linf): - self.n1 = n1 - self.n2 = n2 - self.levels = levels - self.iterations = iterations - self.rho = rho - self.residual = resid - self.l2 = l2 - self.linf = linf - - def __lt__(self, other): - return (self.n1, self.n2) < (other.n1, other.n2) - -Shafranov = 1 -Triangular = 2 - -Polar = 6 -Cartesian = 7 - -Uniform = 0 -NonUniform = 1 - -def get_results(folder): - files = glob.glob(folder+'/job.out*') - results = {} - for geom in (Shafranov, Triangular): - results[geom] = {} - for prob in (Polar, Cartesian): - results[geom][prob] = {} - for uni in (Uniform, NonUniform): - results[geom][prob][uni] = {} - for extrapol in (0, 1): - results[geom][prob][uni][extrapol] = [] - - for f in files: - with open(f) as fl: - lines = fl.readlines() - larray = [l.strip('\n').split() for l in lines] - larray = [l for l in larray if l] - - l2 = [l[4] for l in larray if l[0] == "2-norm"] - linf = [l[4] for l in larray if l[0] == "inf-norm"] - geom = [l[1] for l in larray if l[0] == "mod_pk:"] - extrapol = [l[1] for l in larray if l[0] == "extrapolation:"] - prob = [l[1] for l in larray if l[0] == "prob:"] - aniso = [l[1] for l in larray if l[0] == "fac_ani:"] - iterations = [l[3] for l in larray if l[0] == "Convergence"] - rho = [l[6] for l in larray if len(l) >=5 and l[4] == "rho"] - resid = [l[6].strip(',') for l in larray if len(l) >=2 and l[1] == "Iteration"] - prob_info = [l for l in larray if l[0] == "Prob:"] - assert len(l2)==1 - assert len(linf)==1 - assert len(geom)==1 - assert len(extrapol)==1 - assert len(prob)==1 - assert len(aniso)==1 - assert len(rho)==1 - assert len(iterations)<=1 - assert len(prob_info)==1 - - l2 = float(l2[0]) - linf = float(linf[0]) - geom = int(geom[0]) - extrapol = int(extrapol[0]) - prob = int(prob[0]) - aniso = int(aniso[0]) - rho = float(rho[0]) - iterations = int(iterations[0]) if iterations else None - prob_info = prob_info[0] - levels = int(prob_info[12]) - resid = float(resid[-1]) - n1 = int(prob_info[10][1:-1]) - n2 = int(prob_info[11][:-2]) - res = Result(n1, n2, levels, iterations, rho, resid, l2, linf) - results[geom][prob][aniso][extrapol].append(res) - - return results - -results = get_results('outputs') - -for geom in (Shafranov, Triangular): - for prob in (Polar, Cartesian): - for uni in (Uniform, NonUniform): - for extrapol in (True, False): - results[geom][prob][uni][extrapol].sort() - -configs = [(Triangular, Cartesian, Uniform), - (Triangular, Polar, Uniform), - (Triangular, Polar, NonUniform), - (Shafranov, Cartesian, Uniform), - (Shafranov, Polar, Uniform), - (Shafranov, Polar, NonUniform)] - -letter = ord('A') -for c in configs: - print(r"""\begin{table}[!ht] - \centering - % \footnotesize - \setlength{\tabcolsep}{3pt}""") - print(r"\caption{ Test Case ", chr(letter), "}") - print(r"""\label{tab:par_results} - \begin{tabular}{cccccccccc} - \toprule - $\bf n_r \times n_{\theta}$ & $\bf m$ & $\bf levels$ & $\bf iteration$s & $\bf \Hat{\rho}$ & $\bf residual$ & $\bf \norm{err}_{l_2}$ & $\bf ord$ & $\bf \norm{err}_{\infty}$ & $\bf ord$\\""") - for e in (0,1): - print("\\toprule") - if e == 0: - print(r"\multicolumn{10}{c}{\bf No extrapolation}\\") - else: - print(r"\multicolumn{10}{c}{\bf Implicit extrapolation}\\") - print("\\midrule") - table_result = results[c[0]][c[1]][c[2]][e] - - n_results = len(table_result) - - l2 = 0 - - for r in table_result: - new_m = r.n1*r.n2 - if l2 == 0: - o2 = '-' - oinf = '-' - else: - o2 = np.log(l2/r.l2) / np.log(np.sqrt(new_m/m)) - oinf = np.log(linf/r.linf) / np.log(np.sqrt(new_m/m)) - l2 = r.l2 - linf = r.linf - m = new_m - tmp='{:.2e}'.format(l2).split('e') - l2_str = '${:.2f} \\cdot 10^{{{:d}}}$'.format(float(tmp[0]), int(tmp[1])) - tmp='{:.2e}'.format(linf).split('e') - linf_str = '${:.2f} \\cdot 10^{{{:d}}}$'.format(float(tmp[0]), int(tmp[1])) - tmp='{:.2e}'.format(r.residual).split('e') - resid_str = '${:.2f} \\cdot 10^{{{:d}}}$'.format(float(tmp[0]), int(tmp[1])) - iter_str = '{:,}'.format(r.iterations) if r.iterations else 'N/A' - cells = ['${:,} \\times {:,}$'.format(r.n1, r.n2), - '{:,}'.format(new_m), - '{:,}'.format(r.levels), - iter_str, - '{:.2f}'.format(r.rho), - resid_str, - l2_str, - o2 if isinstance(o2,str) else '{:.2f}'.format(o2), - linf_str, - oinf if isinstance(oinf,str) else '{:.2f}'.format(oinf)] - cells = [s.replace(',','\,') for s in cells] - print("&".join("{:<25}".format(s) for s in cells)+'\\\\') - print(r"\bottomrule") - print(r"\end{tabular}") - print(r"\end{table} ") - letter += 1 diff --git a/scripts/batch_jedi.sh b/scripts/batch_jedi.sh new file mode 100644 index 00000000..4519bb50 --- /dev/null +++ b/scripts/batch_jedi.sh @@ -0,0 +1,169 @@ +#!/bin/bash +#SBATCH --job-name=gmgpolar +#SBATCH --output=slurm-maxLevel13_GMGPolar_JEDI_Rmax13_ani0_DirBC.out +#SBATCH --error=slurm-maxLevel13_GMGPolar_JEDI_Rmax13_ani0_DirBC.err +#SBATCH -N 1 +#SBATCH -n 1 +#SBATCH -c 72 +#SBATCH --gres=gpu:1 +#SBATCH --threads-per-core=1 +#SBATCH --time=0:30:00 +#SBATCH --exclusive +#SBATCH --account=training2508 +#SBATCH --partition=all + + +nvidia-smi -L +echo $CUDA_VISIBLE_DEVICES +# Verbosity level: + +# Set Paraview usage flag: +# 0 - Do not use Paraview +# 1 - Enable Paraview to visualize the grid, solution and error +paraview=0 + +# OpenMP settings: +maxOpenMPThreads=72 + +# Finest grid parameters +R0=1e-8 +Rmax=1.3 +nr_exp=4 +ntheta_exp=-1 +anisotropic_factor=0 + +# Interior boundary condition: +# 0: Across-origin +# 1: u_D_Interior +DirBC_Interior=1 + +# Full Multigrid Method: +# 0: Initial approximation is set to zero +# 1: Initial approximation obtained by nested iteration (recommended) +FMG=0 +FMG_iterations=3 +FMG_cycle=2 # V-Cycle(0), W-Cycle(1), F-Cycle(2) + +# Extrapolation Method: +# 0: No extrapolation +# 1: Implicit extrapolation (recommended) +# 2: Implicit extrapolation with full grid smoothing (residuals cannot be used as convergence criteria) +# 3: Combination of both implicit extrapolation methods (May be usefull for FMG=0) +extrapolation=1 +# Number of smoothing steps: +preSmoothingSteps=1 +postSmoothingSteps=1 +# Multigrid Cycle: +# 0: V-Cycle +# 1: W-Cycle +# 2: F-Cycle +multigridCycle=0 + +# Convergence criteria: +maxIterations=20 +residualNormType=0 # L2-Norm(0) = 0, Weighted L2-Norm(1), Infinity-Norm(2) +absoluteTolerance=1e-100 +relativeTolerance=1e-100 + +module load GCC CMake CUDA +spack load mumps metis +# MUMPS 5.5.1 +# CUDA 12 +gcc --version + +# Maximum number of multigrid levels: +maxLevels=13 +gpuLevels=-1 + +#### GPU #### +# Maximum number of multigrid levels: +maxLevels=13 +gpuLevels=-1 + +# 0 - No output +# 1 - Basic output +verbose=1 + +let divideBy2=4 +while [ $divideBy2 -le 10 ]; do +srun --cpus-per-task=1 ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance +let divideBy2=divideBy2+1 +done; + + +# Convergence criteria: +maxIterations=200 +residualNormType=0 # L2-Norm(0) = 0, Weighted L2-Norm(1), Infinity-Norm(2) +absoluteTolerance=1e-14 +relativeTolerance=1e-8 + +# 0 - No output +# 1 - Basic output +let divideBy2=4 +while [ $divideBy2 -le 10 ]; do +srun --cpus-per-task=1 ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance +let divideBy2=divideBy2+1 +done; + +#### CPU ##### +# Maximum number of multigrid levels: +maxLevels=13 +gpuLevels=0 + +# Convergence criteria: +maxIterations=20 +residualNormType=0 # L2-Norm(0) = 0, Weighted L2-Norm(1), Infinity-Norm(2) +absoluteTolerance=1e-100 +relativeTolerance=1e-100 + +let divideBy2=4 +while [ $divideBy2 -le 10 ]; do +srun --cpus-per-task=$maxOpenMPThreads ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance +let divideBy2=divideBy2+1 +done; + + +# Convergence criteria: +maxIterations=200 +residualNormType=0 # L2-Norm(0) = 0, Weighted L2-Norm(1), Infinity-Norm(2) +absoluteTolerance=1e-14 +relativeTolerance=1e-8 + +# 0 - No output +# 1 - Basic output +let divideBy2=4 +while [ $divideBy2 -le 10 ]; do +srun --cpus-per-task=$maxOpenMPThreads ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance +let divideBy2=divideBy2+1 +done; + +# # profiles +# divideBy2=10 + +# maxLevels=13 +# gpuLevels=-1 +# srun --cpus-per-task=1 nsys profile --trace nvtx,cuda ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance +# srun --cpus-per-task=1 ncu --set full --export full_eval.ncu-rep ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance + + +# maxLevels=13 +# gpuLevels=0 +# srun --cpus-per-task=$maxOpenMPThreads nsys profile --trace nvtx,cuda ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance + + + + +# likwid +# module load likwid + +# maxLevels=13 +# gpuLevels=-1 +# srun --cpus-per-task=1 likwid-perfctr -g FLOPS ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance + +# srun --cpus-per-task=1 likwid-perfctr -g MEM ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads 1 --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance + +# maxLevels=13 +# gpuLevels=0 +# srun --cpus-per-task=$maxOpenMPThreads likwid-perfctr -g FLOPS ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance + +# srun --cpus-per-task=$maxOpenMPThreads likwid-perfctr -g MEM ./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance \ No newline at end of file diff --git a/scripts/compile.sh b/scripts/compile.sh new file mode 100755 index 00000000..d6c658cb --- /dev/null +++ b/scripts/compile.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Function to display usage information +usage() { + echo "Usage: $0 [Debug|Release]" + exit 1 +} + +# Check if build directory exists in the parent directory +if [ -d "../build" ]; then + build_exists=true +else + build_exists=false +fi + +# Check if build directory exists and delete if it does (only if an argument is provided) +if [ -n "$1" ] && [ -d "../build" ]; then + echo "Removing existing build directory..." + rm -rf ../build || { echo "Failed to remove build directory"; exit 1; } + build_exists=false +fi + +# Create build directory in the parent directory if it doesn't exist and if a build folder didn't exist before +if ! $build_exists; then + echo "Creating build directory..." + mkdir -p ../build || { echo "Failed to create build directory"; exit 1; } + build_exists=true +fi + +# Determine build type +if [ -n "$1" ]; then + case "$1" in + Debug) + build_type="Debug" + ;; + Release) + build_type="Release" + ;; + *) + echo "Invalid build type. Please specify Debug or Release." + usage + ;; + esac +else + if [ "$build_exists" != true ]; then + echo "No build type specified. Please provide either Debug or Release." + usage + fi +fi + +if [ -n "$build_type" ]; then + echo "Configuring with $build_type build type..." + cmake -S ${PWD}/.. -B ${PWD}/../build -DCMAKE_BUILD_TYPE="$build_type" -DCMAKE_PREFIX_PATH="/scratch/spack-23.2/opt/spack/linux-ubuntu20.04-x86_64_v3/gcc-12.3.0/mumps-5.5.1-afnceqpp75o4zmfmqpbvr4whi2li2r4i" .. || { echo "CMake configuration failed"; exit 1; } +fi + +cmake --build ${PWD}/../build -j 16 \ No newline at end of file diff --git a/scripts/ctest.sh b/scripts/ctest.sh new file mode 100755 index 00000000..4abffad7 --- /dev/null +++ b/scripts/ctest.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Navigate to the build directory +cd ../build || { echo "Build folder not found!"; exit 1; } + +# Run ctest in verbose mode +ctest --verbose \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100755 index 00000000..209c3312 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# Verbosity level: +# 0 - No output +# 1 - Basic output +verbose=1 +# Set Paraview usage flag: +# 0 - Do not use Paraview +# 1 - Enable Paraview to visualize the grid, solution and error +paraview=0 + +# OpenMP settings: +maxOpenMPThreads=32 + +# Finest grid parameters +R0=1e-8 +Rmax=1.3 +nr_exp=4 +ntheta_exp=-1 +anisotropic_factor=3 +divideBy2=3 + +# Interior boundary condition: +# 0: Across-origin +# 1: u_D_Interior +DirBC_Interior=0 + +# Full Multigrid Method: +# 0: Initial approximation is set to zero +# 1: Initial approximation obtained by nested iteration (recommended) +FMG=0 +FMG_iterations=3 +FMG_cycle=2 # V-Cycle(0), W-Cycle(1), F-Cycle(2) + +# Extrapolation Method: +# 0: No extrapolation +# 1: Implicit extrapolation (recommended) +# 2: Implicit extrapolation with full grid smoothing (residuals cannot be used as convergence criteria) +# 3: Combination of both implicit extrapolation methods (May be usefull for FMG=0) +extrapolation=1 +# Maximum number of multigrid levels: +maxLevels=7 +gpuLevels=-1 +# Number of smoothing steps: +preSmoothingSteps=1 +postSmoothingSteps=1 +# Multigrid Cycle: +# 0: V-Cycle +# 1: W-Cycle +# 2: F-Cycle +multigridCycle=0 + +# Convergence criteria: +maxIterations=300 +residualNormType=0 # L2-Norm(0) = 0, Weighted L2-Norm(1), Infinity-Norm(2) +absoluteTolerance=1e-8 +relativeTolerance=1e-8 + +./../build/gmgpolar --verbose $verbose --paraview $paraview --maxOpenMPThreads $maxOpenMPThreads --R0 $R0 --Rmax $Rmax --nr_exp $nr_exp --ntheta_exp $ntheta_exp --anisotropic_factor $anisotropic_factor --divideBy2 $divideBy2 --DirBC_Interior $DirBC_Interior --FMG $FMG --FMG_iterations $FMG_iterations --FMG_cycle $FMG_cycle --extrapolation $extrapolation --maxLevels $maxLevels --gpuLevels $gpuLevels --preSmoothingSteps $preSmoothingSteps --postSmoothingSteps $postSmoothingSteps --multigridCycle $multigridCycle --maxIterations $maxIterations --residualNormType $residualNormType --absoluteTolerance $absoluteTolerance --relativeTolerance $relativeTolerance \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 214365f4..00000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,91 +0,0 @@ -set(SRC_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/build_bi_aniso_rdir_phiper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/build_fd9star_anisotr_scaled.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/build_rhs_apply_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/create_grid_polar.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debug.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/define_coarse_nodes.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/direct_solve.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gmgpolar.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gyro.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/level.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/multigrid_iter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/polar_multigrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/prolongation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/RHS.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/smoother.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/smoother0.cpp) - -set(SRC_TEST_CASES_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroSonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroSonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroSonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2GyroZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2PoissonCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2PoissonShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2PoissonTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2SonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2SonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2SonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR2ZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroSonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroSonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroSonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6GyroZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6PoissonCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6PoissonShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6PoissonTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6SonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6SonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6SonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/CartesianR6ZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroSonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroSonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroSonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniShiftedCulham.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6GyroZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6PoissonCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6PoissonShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6PoissonTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6SonnendruckerCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6SonnendruckerShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6SonnendruckerTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniShiftedTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/PolarR6ZoniTriangular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/RefinedGyroZoniShiftedCircular.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/RefinedGyroZoniShiftedCulham.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/RefinedGyroZoniShiftedShafranov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cases/RefinedGyroZoniShiftedTriangular.cpp -) - -set(SOURCES_SRC ${SRC_FILES} ${SRC_TEST_CASES_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/DirectSolver/applySymmetryShift.cpp b/src/DirectSolver/applySymmetryShift.cpp new file mode 100644 index 00000000..f3188530 --- /dev/null +++ b/src/DirectSolver/applySymmetryShift.cpp @@ -0,0 +1,101 @@ +#include "../../include/DirectSolver/directSolver.h" + +/* ----------------------- */ +/* Boundary Symmetry Shift */ +/* ----------------------- */ + +void DirectSolver::applySymmetryShiftInnerBoundary(Vector& x) const +{ + assert(DirBC_Interior_); + + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + + const int i_r = 1; + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + double h1 = grid_.radialSpacing(i_r - 1); + double k1 = grid_.angularSpacing(i_theta - 1); + double k2 = grid_.angularSpacing(i_theta); + + double coeff1 = 0.5 * (k1 + k2) / h1; + + const int i_theta_M1 = grid_.wrapThetaIndex(i_theta - 1); + const int i_theta_P1 = grid_.wrapThetaIndex(i_theta + 1); + + const int bottom_left = grid_.index(i_r - 1, i_theta_M1); + const int left = grid_.index(i_r - 1, i_theta); + const int top_left = grid_.index(i_r - 1, i_theta_P1); + const int bottom = grid_.index(i_r, i_theta_M1); + const int center = grid_.index(i_r, i_theta); + const int top = grid_.index(i_r, i_theta_P1); + + x[center] -= (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ + ); + } +} + +void DirectSolver::applySymmetryShiftOuterBoundary(Vector& x) const +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + + const int i_r = grid_.nr() - 2; + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + double h2 = grid_.radialSpacing(i_r); + double k1 = grid_.angularSpacing(i_theta - 1); + double k2 = grid_.angularSpacing(i_theta); + + double coeff2 = 0.5 * (k1 + k2) / h2; + + const int i_theta_M1 = grid_.wrapThetaIndex(i_theta - 1); + const int i_theta_P1 = grid_.wrapThetaIndex(i_theta + 1); + + const int bottom = grid_.index(i_r, i_theta_M1); + const int center = grid_.index(i_r, i_theta); + const int top = grid_.index(i_r, i_theta_P1); + const int bottom_right = grid_.index(i_r + 1, i_theta_M1); + const int right = grid_.index(i_r + 1, i_theta); + const int top_right = grid_.index(i_r + 1, i_theta_P1); + + x[center] -= (-coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ + ); + } +} + +void DirectSolver::applySymmetryShift(Vector& x) const +{ + assert(x.size() == grid_.numberOfNodes()); + assert(grid_.nr() >= 4); + + if (omp_get_max_threads() == 1) { + /* Single-threaded execution */ + if (DirBC_Interior_) { + applySymmetryShiftInnerBoundary(x); + } + applySymmetryShiftOuterBoundary(x); + } + else { +#pragma omp parallel sections + { +#pragma omp section + { + if (DirBC_Interior_) { + applySymmetryShiftInnerBoundary(x); + } + } + +#pragma omp section + { + applySymmetryShiftOuterBoundary(x); + } + } + } +} \ No newline at end of file diff --git a/src/DirectSolver/buildSolverMatrix.cpp b/src/DirectSolver/buildSolverMatrix.cpp new file mode 100644 index 00000000..1d823768 --- /dev/null +++ b/src/DirectSolver/buildSolverMatrix.cpp @@ -0,0 +1,546 @@ +#include "../../include/DirectSolver/directSolver.h" + +#define NODE_BUILD_SOLVER_MATRIX_TAKE(i_r, i_theta, grid, DirBC_Interior, solver_matrix, arr, att, art, detDF, \ + coeff_beta) \ + do { \ + /* -------------------- */ \ + /* Node in the interior */ \ + /* -------------------- */ \ + if (i_r > 1 && i_r < grid.nr() - 2) { \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const double h1 = grid.radialSpacing(i_r - 1); \ + const double h2 = grid.radialSpacing(i_r); \ + const double k1 = grid.angularSpacing(i_theta_M1); \ + const double k2 = grid.angularSpacing(i_theta); \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + const int left_index = grid.index(i_r - 1, i_theta); \ + const int right_index = grid.index(i_r + 1, i_theta); \ + const int bottom_index = grid.index(i_r, i_theta_M1); \ + const int top_index = grid.index(i_r, i_theta_P1); \ + const int bottom_left_index = grid.index(i_r - 1, i_theta_M1); \ + const int bottom_right_index = grid.index(i_r + 1, i_theta_M1); \ + const int top_left_index = grid.index(i_r - 1, i_theta_P1); \ + const int top_right_index = grid.index(i_r + 1, i_theta_P1); \ + \ + const double left_value = -coeff1 * (arr[center_index] + arr[left_index]); /* Left */ \ + const double right_value = -coeff2 * (arr[center_index] + arr[right_index]); /* Right */ \ + const double bottom_value = -coeff3 * (att[center_index] + att[bottom_index]); /* Bottom */ \ + const double top_value = -coeff4 * (att[center_index] + att[top_index]); /* Top */ \ + \ + const double center_value = \ + (+0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center_index]) /* beta_{i,j} */ \ + - left_value /* Center: (Left) */ \ + - right_value /* Center: (Right) */ \ + - bottom_value /* Center: (Bottom) */ \ + - top_value /* Center: (Top) */ \ + ); \ + \ + const double bottom_left_value = -0.25 * (art[left_index] + art[bottom_index]); /* Bottom Left */ \ + const double bottom_right_value = +0.25 * (art[right_index] + art[bottom_index]); /* Bottom Right */ \ + const double top_left_value = +0.25 * (art[left_index] + art[top_index]); /* Top Left */ \ + const double top_right_value = -0.25 * (art[right_index] + art[top_index]); /* Top Right */ \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = center_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = left_index + 1; \ + solver_matrix.value(nz_index) = left_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Right]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = right_index + 1; \ + solver_matrix.value(nz_index) = right_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Bottom]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_index + 1; \ + solver_matrix.value(nz_index) = bottom_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Top]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_index + 1; \ + solver_matrix.value(nz_index) = top_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_left_index + 1; \ + solver_matrix.value(nz_index) = bottom_left_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_right_index + 1; \ + solver_matrix.value(nz_index) = bottom_right_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::TopLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_left_index + 1; \ + solver_matrix.value(nz_index) = top_left_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::TopRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_right_index + 1; \ + solver_matrix.value(nz_index) = top_right_value; \ + \ + /* -------------------------- */ \ + /* Node on the inner boundary */ \ + /* -------------------------- */ \ + } \ + else if (i_r == 0) { \ + /* ------------------------------------------------ */ \ + /* Case 1: Dirichlet boundary on the inner boundary */ \ + /* ------------------------------------------------ */ \ + if (DirBC_Interior) { \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = 1.0; \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + grid.ntheta()/2). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + assert(grid_.ntheta() % 2 == 0); \ + const int i_theta_AcrossOrigin = grid.wrapThetaIndex(i_theta + grid.ntheta() / 2); \ + \ + double h1 = 2.0 * grid.radius(0); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta_M1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + const int left_index = grid.index(i_r, i_theta_AcrossOrigin); \ + const int right_index = grid.index(i_r + 1, i_theta); \ + const int bottom_index = grid.index(i_r, i_theta_M1); \ + const int top_index = grid.index(i_r, i_theta_P1); \ + const int bottom_right_index = grid.index(i_r + 1, i_theta_M1); \ + const int top_right_index = grid.index(i_r + 1, i_theta_P1); \ + \ + const double left_value = -coeff1 * (arr[center_index] + arr[left_index]); /* Left */ \ + const double right_value = -coeff2 * (arr[center_index] + arr[right_index]); /* Right */ \ + const double bottom_value = -coeff3 * (att[center_index] + att[bottom_index]); /* Bottom */ \ + const double top_value = -coeff4 * (att[center_index] + att[top_index]); /* Top */ \ + \ + const double center_value = \ + (+0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center_index]) /* beta_{i,j} */ \ + - left_value /* Center: (Left) */ \ + - right_value /* Center: (Right) */ \ + - bottom_value /* Center: (Bottom) */ \ + - top_value /* Center: (Top) */ \ + ); \ + \ + const double bottom_right_value = +0.25 * (art[right_index] + art[bottom_index]); /* Bottom Right */ \ + const double top_right_value = -0.25 * (art[right_index] + art[top_index]); /* Top Right */ \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = center_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = left_index + 1; \ + solver_matrix.value(nz_index) = left_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Right]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = right_index + 1; \ + solver_matrix.value(nz_index) = right_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Bottom]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_index + 1; \ + solver_matrix.value(nz_index) = bottom_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Top]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_index + 1; \ + solver_matrix.value(nz_index) = top_value; \ + \ + /* REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + /* nz_index = center_nz_index + CenterStencil[StencilType::BottomLeft]; */ \ + /* solver_matrix.row_index(nz_index) = center_index + 1; */ \ + /* solver_matrix.col_index(nz_index) = bottom_left_index + 1; */ \ + /* solver_matrix.value(nz_index) = bottom_left_value; */ \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_right_index + 1; \ + solver_matrix.value(nz_index) = bottom_right_value; \ + \ + /* REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + /* nz_index = center_nz_index + CenterStencil[StencilType::TopLeft]; */ \ + /* solver_matrix.row_index(nz_index) = center_index + 1; */ \ + /* solver_matrix.col_index(nz_index) = top_left_index + 1; */ \ + /* solver_matrix.value(nz_index) = top_left_value; */ \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::TopRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_right_index + 1; \ + solver_matrix.value(nz_index) = top_right_value; \ + } \ + /* ------------------------------- */ \ + /* Node next to the inner boundary */ \ + /* ------------------------------- */ \ + } \ + else if (i_r == 1) { \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const double h1 = grid.radialSpacing(i_r - 1); \ + const double h2 = grid.radialSpacing(i_r); \ + const double k1 = grid.angularSpacing(i_theta_M1); \ + const double k2 = grid.angularSpacing(i_theta); \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + const int left_index = grid.index(i_r - 1, i_theta); \ + const int right_index = grid.index(i_r + 1, i_theta); \ + const int bottom_index = grid.index(i_r, i_theta_M1); \ + const int top_index = grid.index(i_r, i_theta_P1); \ + const int bottom_left_index = grid.index(i_r - 1, i_theta_M1); \ + const int bottom_right_index = grid.index(i_r + 1, i_theta_M1); \ + const int top_left_index = grid.index(i_r - 1, i_theta_P1); \ + const int top_right_index = grid.index(i_r + 1, i_theta_P1); \ + \ + const double left_value = -coeff1 * (arr[center_index] + arr[left_index]); /* Left */ \ + const double right_value = -coeff2 * (arr[center_index] + arr[right_index]); /* Right */ \ + const double bottom_value = -coeff3 * (att[center_index] + att[bottom_index]); /* Bottom */ \ + const double top_value = -coeff4 * (att[center_index] + att[top_index]); /* Top */ \ + \ + const double center_value = \ + (+0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center_index]) /* beta_{i,j} */ \ + - left_value /* Center: (Left) */ \ + - right_value /* Center: (Right) */ \ + - bottom_value /* Center: (Bottom) */ \ + - top_value /* Center: (Top) */ \ + ); \ + \ + const double bottom_left_value = -0.25 * (art[left_index] + art[bottom_index]); /* Bottom Left */ \ + const double bottom_right_value = +0.25 * (art[right_index] + art[bottom_index]); /* Bottom Right */ \ + const double top_left_value = +0.25 * (art[left_index] + art[top_index]); /* Top Left */ \ + const double top_right_value = -0.25 * (art[right_index] + art[top_index]); /* Top Right */ \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = center_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + if (!DirBC_Interior) { \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = left_index + 1; \ + solver_matrix.value(nz_index) = left_value; \ + } \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Right]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = right_index + 1; \ + solver_matrix.value(nz_index) = right_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Bottom]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_index + 1; \ + solver_matrix.value(nz_index) = bottom_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Top]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_index + 1; \ + solver_matrix.value(nz_index) = top_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + if (!DirBC_Interior) { \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_left_index + 1; \ + solver_matrix.value(nz_index) = bottom_left_value; \ + } \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_right_index + 1; \ + solver_matrix.value(nz_index) = bottom_right_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + if (!DirBC_Interior) { \ + nz_index = center_nz_index + CenterStencil[StencilType::TopLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_left_index + 1; \ + solver_matrix.value(nz_index) = top_left_value; \ + } \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::TopRight]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_right_index + 1; \ + solver_matrix.value(nz_index) = top_right_value; \ + \ + /* ------------------------------- */ \ + /* Node next to the outer boundary */ \ + /* ------------------------------- */ \ + } \ + else if (i_r == grid.nr() - 2) { \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const double h1 = grid.radialSpacing(i_r - 1); \ + const double h2 = grid.radialSpacing(i_r); \ + const double k1 = grid.angularSpacing(i_theta_M1); \ + const double k2 = grid.angularSpacing(i_theta); \ + \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + const int left_index = grid.index(i_r - 1, i_theta); \ + const int right_index = grid.index(i_r + 1, i_theta); \ + const int bottom_index = grid.index(i_r, i_theta_M1); \ + const int top_index = grid.index(i_r, i_theta_P1); \ + const int bottom_left_index = grid.index(i_r - 1, i_theta_M1); \ + const int bottom_right_index = grid.index(i_r + 1, i_theta_M1); \ + const int top_left_index = grid.index(i_r - 1, i_theta_P1); \ + const int top_right_index = grid.index(i_r + 1, i_theta_P1); \ + \ + const double left_value = -coeff1 * (arr[center_index] + arr[left_index]); /* Left */ \ + const double right_value = -coeff2 * (arr[center_index] + arr[right_index]); /* Right */ \ + const double bottom_value = -coeff3 * (att[center_index] + att[bottom_index]); /* Bottom */ \ + const double top_value = -coeff4 * (att[center_index] + att[top_index]); /* Top */ \ + \ + const double center_value = \ + (+0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center_index]) /* beta_{i,j} */ \ + - left_value /* Center: (Left) */ \ + - right_value /* Center: (Right) */ \ + - bottom_value /* Center: (Bottom) */ \ + - top_value /* Center: (Top) */ \ + ); \ + \ + const double bottom_left_value = -0.25 * (art[left_index] + art[bottom_index]); /* Bottom Left */ \ + const double bottom_right_value = +0.25 * (art[right_index] + art[bottom_index]); /* Bottom Right */ \ + const double top_left_value = +0.25 * (art[left_index] + art[top_index]); /* Top Left */ \ + const double top_right_value = -0.25 * (art[right_index] + art[top_index]); /* Top Right */ \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = center_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = left_index + 1; \ + solver_matrix.value(nz_index) = left_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + /* nz_index = center_nz_index + CenterStencil[StencilType::Right]; */ \ + /* solver_matrix.row_index(nz_index) = center_index + 1; */ \ + /* solver_matrix.col_index(nz_index) = right_index + 1; */ \ + /* solver_matrix.value(nz_index) = right_value; */ \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Bottom]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_index + 1; \ + solver_matrix.value(nz_index) = bottom_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Top]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_index + 1; \ + solver_matrix.value(nz_index) = top_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::BottomLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = bottom_left_index + 1; \ + solver_matrix.value(nz_index) = bottom_left_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + /* nz_index = center_nz_index + CenterStencil[StencilType::BottomRight]; */ \ + /* solver_matrix.row_index(nz_index) = center_index + 1; */ \ + /* solver_matrix.col_index(nz_index) = bottom_right_index + 1; */ \ + /* solver_matrix.value(nz_index) = bottom_right_value; */ \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::TopLeft]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = top_left_index + 1; \ + solver_matrix.value(nz_index) = top_left_value; \ + \ + /* REMOVED: Moved to the right hand side to make the matrix symmetric */ \ + /* nz_index = center_nz_index + CenterStencil[StencilType::TopRight]; */ \ + /* solver_matrix.row_index(nz_index) = center_index + 1; */ \ + /* solver_matrix.col_index(nz_index) = top_right_index + 1; */ \ + /* solver_matrix.value(nz_index) = top_right_value; */ \ + \ + /* ------------------------------------ */ \ + /* Node on the outer dirichlet boundary */ \ + /* ------------------------------------ */ \ + } \ + else if (i_r == grid.nr() - 1) { \ + const int center_nz_index = getSolverMatrixIndex(i_r, i_theta); \ + \ + int nz_index; /* Current non_zero index in solver_matrix */ \ + \ + const int center_index = grid.index(i_r, i_theta); \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + solver_matrix.row_index(nz_index) = center_index + 1; \ + solver_matrix.col_index(nz_index) = center_index + 1; \ + solver_matrix.value(nz_index) = 1.0; \ + } \ + } while (0) + +void DirectSolver::buildSolverMatrixCircleSection(const int i_r, SparseMatrix& solver_matrix) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + // Build solver matrix at the current node + NODE_BUILD_SOLVER_MATRIX_TAKE(i_r, i_theta, grid_, DirBC_Interior_, solver_matrix, arr, att, art, detDF, + coeff_beta); + } +} + +void DirectSolver::buildSolverMatrixRadialSection(const int i_theta, SparseMatrix& solver_matrix) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + // Build solver matrix at the current node + NODE_BUILD_SOLVER_MATRIX_TAKE(i_r, i_theta, grid_, DirBC_Interior_, solver_matrix, arr, att, art, detDF, + coeff_beta); + } +} + +/* ------------------------------------------------------------------------ */ +/* If the indexing is not smoother-based, please adjust the access patterns */ +SparseMatrix DirectSolver::buildSolverMatrix() +{ + const int n = grid_.numberOfNodes(); + const int nnz = getNonZeroCountSolverMatrix(); + + // Although the matrix is symmetric, we need to store all its entries, so we disable the symmetry. + SparseMatrix solver_matrix(n, n, nnz); + solver_matrix.is_symmetric(false); + + if (omp_get_max_threads() == 1) { + /* Single-threaded execution */ + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + buildSolverMatrixCircleSection(i_r, solver_matrix); + } + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + buildSolverMatrixRadialSection(i_theta, solver_matrix); + } + } + else { +/* Multi-threaded execution */ +#pragma omp parallel + { +/* Circle Section */ +#pragma omp for nowait + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + buildSolverMatrixCircleSection(i_r, solver_matrix); + } +/* Radial Section */ +#pragma omp for nowait + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + buildSolverMatrixRadialSection(i_theta, solver_matrix); + } + } + } + + /* Mumps: In the case of symmetric matrices, only half of the matrix should be provided. */ + const bool construct_symmetric = true; + + if (!construct_symmetric) { + return solver_matrix; + } + + /* Only store the upper tridiagonal entries of the symmetric solver_matrix */ + const int symmetric_nnz = nnz - (nnz - n) / 2; + SparseMatrix symmetric_solver_matrix(n, n, symmetric_nnz); + symmetric_solver_matrix.is_symmetric(true); + + int current_nz = 0; + for (int nz_index = 0; nz_index < nnz; nz_index++) { + const int row = solver_matrix.row_index(nz_index); + const int col = solver_matrix.col_index(nz_index); + if (row <= col) { + symmetric_solver_matrix.row_index(current_nz) = row; + symmetric_solver_matrix.col_index(current_nz) = col; + symmetric_solver_matrix.value(current_nz) = std::move(solver_matrix.value(nz_index)); + current_nz++; + } + } + + return symmetric_solver_matrix; +} \ No newline at end of file diff --git a/src/DirectSolver/directSolver.cpp b/src/DirectSolver/directSolver.cpp new file mode 100644 index 00000000..a6a16085 --- /dev/null +++ b/src/DirectSolver/directSolver.cpp @@ -0,0 +1,28 @@ +#include "../../include/DirectSolver/directSolver.h" + +DirectSolver::DirectSolver(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior) + : grid_(level.grid()) + , level_cache_(level.levelCache()) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) +{ + solver_matrix_ = buildSolverMatrix(); + initializeMumpsSolver(mumps_solver_, solver_matrix_); +} + +void DirectSolver::solveInPlace(Vector& solution) +{ + // Adjusts the right-hand side vector to account for symmetry corrections. + // This transforms the system matrixA * solution = rhs into the equivalent system: + // symmetric(matrixA) * solution = rhs - applySymmetryShift(rhs). + applySymmetryShift(solution); + // Solves the adjusted system symmetric(matrixA) * solution = rhs using the MUMPS solver. + solveWithMumps(solution); +} + +DirectSolver::~DirectSolver() +{ + finalizeMumpsSolver(mumps_solver_); +} \ No newline at end of file diff --git a/src/DirectSolver/initializeMumps.cpp b/src/DirectSolver/initializeMumps.cpp new file mode 100644 index 00000000..9589cee0 --- /dev/null +++ b/src/DirectSolver/initializeMumps.cpp @@ -0,0 +1,111 @@ +#include "../../include/DirectSolver/directSolver.h" + +void DirectSolver::initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, const SparseMatrix& solver_matrix) +{ + mumps_solver.job = JOB_INIT; + mumps_solver.par = PAR_PARALLEL; + /* The matrix is positive definite for invertible mappings. */ + /* Therefore we use SYM_POSITIVE_DEFINITE instead of SYM_GENERAL_SYMMETRIC. */ + mumps_solver.sym = (solver_matrix.is_symmetric() ? SYM_POSITIVE_DEFINITE : SYM_UNSYMMETRIC); + mumps_solver.comm_fortran = USE_COMM_WORLD; + dmumps_c(&mumps_solver); + + mumps_solver.ICNTL(1) = 0; // Output stream for error messages. + mumps_solver.ICNTL(2) = 0; // Output stream for diagnostic printing and statistics local to each MPI process. + mumps_solver.ICNTL(3) = 0; // Output stream for global information, collected on the host + mumps_solver.ICNTL(4) = 0; // Level of printing for error, warning, and diagnostic messages. + mumps_solver.ICNTL(5) = 0; // Controls the matrix input format + mumps_solver.ICNTL(6) = 7; // Permutes the matrix to a zero-free diagonal and/or scale the matrix + mumps_solver.ICNTL(7) = + 5; // Computes a symmetric permutation (ordering) to determine the pivot order to be used for the + // factorization in case of sequential analysis + mumps_solver.ICNTL(8) = 77; // Describes the scaling strategy + mumps_solver.ICNTL(9) = 1; // Computes the solution using A or A^T + mumps_solver.ICNTL(10) = 0; // Applies the iterative refinement to the computed solution + mumps_solver.ICNTL(11) = 0; // Computes statistics related to an error analysis of the linear system solved + mumps_solver.ICNTL(12) = 0; // Defines an ordering strategy for symmetric matrices and is used + mumps_solver.ICNTL(13) = 0; // Controls the parallelism of the root node + mumps_solver.ICNTL(14) = // Controls the percentage increase in the estimated working space + (solver_matrix.is_symmetric() ? 5 : 20); + mumps_solver.ICNTL(15) = 0; // Exploits compression of the input matrix resulting from a block format + mumps_solver.ICNTL(16) = 0; // Controls the setting of the number of OpenMP threads + // ICNTL(17) Doesn't exist + mumps_solver.ICNTL(18) = 0; // Defines the strategy for the distributed input matrix + mumps_solver.ICNTL(19) = 0; // Computes the Schur complement matrix + mumps_solver.ICNTL(20) = 0; // Determines the format (dense, sparse, or distributed) of the right-hand sides + mumps_solver.ICNTL(21) = 0; // Determines the distribution (centralized or distributed) of the solution vectors. + mumps_solver.ICNTL(22) = 0; // Controls the in-core/out-of-core (OOC) factorization and solve. + mumps_solver.ICNTL(23) = 0; // Corresponds to the maximum size of the working memory in MegaBytes that MUMPS can + // allocate per working process + mumps_solver.ICNTL(24) = 0; // Controls the detection of “null pivot rows”. + mumps_solver.ICNTL(25) = + 0; // Allows the computation of a solution of a deficient matrix and also of a null space basis + mumps_solver.ICNTL(26) = 0; // Drives the solution phase if a Schur complement matrix has been computed + mumps_solver.ICNTL(27) = -32; // Controls the blocking size for multiple right-hand sides. + mumps_solver.ICNTL(28) = 0; // Determines whether a sequential or parallel computation of the ordering is performed + mumps_solver.ICNTL(29) = + 0; // Defines the parallel ordering tool (when ICNTL(28)=1) to be used to compute the fill-in reducing permutation. + mumps_solver.ICNTL(30) = 0; // Computes a user-specified set of entries in the inverse A^−1 of the original matrix + mumps_solver.ICNTL(31) = 0; // Indicates which factors may be discarded during the factorization. + mumps_solver.ICNTL(32) = 0; // Performs the forward elimination of the right-hand sides during the factorization + mumps_solver.ICNTL(33) = 0; // Computes the determinant of the input matrix. + mumps_solver.ICNTL(34) = 0; // Controls the conservation of the OOC files during JOB= –3 + mumps_solver.ICNTL(35) = 0; // Controls the activation of the BLR feature + mumps_solver.ICNTL(36) = 0; // Controls the choice of BLR factorization variant + mumps_solver.ICNTL(37) = 0; // Controls the BLR compression of the contribution blocks + mumps_solver.ICNTL(38) = 600; // Estimates compression rate of LU factors + mumps_solver.ICNTL(39) = 500; // Estimates compression rate of contribution blocks + // ICNTL(40-47) Don't exist + mumps_solver.ICNTL(48) = 1; // Multithreading with tree parallelism + mumps_solver.ICNTL(49) = 0; // Compact workarray id%S at the end of factorization phase + // ICNTL(50-55) Don't exist + mumps_solver.ICNTL(56) = + 0; // Detects pseudo-singularities during factorization and factorizes the root node with a rankrevealing method + // ICNTL(57) Doesn't exist + mumps_solver.ICNTL(58) = 2; // Defines options for symbolic factorization + // ICNTL(59-60) Don't exist + + mumps_solver.CNTL(1) = -1.0; // Relative threshold for numerical pivoting + mumps_solver.CNTL(2) = -1.0; // Stopping criterion for iterative refinement + mumps_solver.CNTL(3) = 0.0; // Determine null pivot rows + mumps_solver.CNTL(4) = -1.0; // Determines the threshold for static pivoting + mumps_solver.CNTL(5) = + 0.0; // Defines the fixation for null pivots and is effective only when null pivot row detection is active + // CNTL(6) Doesn't exist + mumps_solver.CNTL(7) = 0.0; // Defines the precision of the dropping parameter used during BLR compression + // CNTL(8-15) Don't exist + + mumps_solver.job = JOB_ANALYSIS_AND_FACTORIZATION; + assert(solver_matrix.rows() == solver_matrix.columns()); + mumps_solver.n = solver_matrix.rows(); + mumps_solver.nz = solver_matrix.non_zero_size(); + mumps_solver.irn = solver_matrix.row_indices_data(); + mumps_solver.jcn = solver_matrix.column_indices_data(); + mumps_solver.a = solver_matrix.values_data(); + dmumps_c(&mumps_solver); + + if (mumps_solver.sym == SYM_POSITIVE_DEFINITE && mumps_solver.INFOG(12) != 0) { + std::cout + << "Warning: DirectSolver matrix is not positive definite: Negative pivots in the factorization phase." + << std::endl; + } +} + +void DirectSolver::solveWithMumps(Vector& result_rhs) +{ + mumps_solver_.job = JOB_COMPUTE_SOLUTION; + mumps_solver_.nrhs = 1; + mumps_solver_.nz_rhs = result_rhs.size(); + mumps_solver_.rhs = result_rhs.begin(); + mumps_solver_.lrhs = result_rhs.size(); + dmumps_c(&mumps_solver_); + if (mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the direct system: " << mumps_solver_.info[0] << std::endl; + } +} + +void DirectSolver::finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver) +{ + mumps_solver.job = JOB_END; + dmumps_c(&mumps_solver); +} \ No newline at end of file diff --git a/src/DirectSolver/matrixStencil.cpp b/src/DirectSolver/matrixStencil.cpp new file mode 100644 index 00000000..1bd29b70 --- /dev/null +++ b/src/DirectSolver/matrixStencil.cpp @@ -0,0 +1,120 @@ +#include "../../include/DirectSolver/directSolver.h" + +const Stencil& DirectSolver::getStencil(int i_r) const +{ + assert(0 <= i_r && i_r < grid_.nr()); + assert(grid_.nr() >= 4); + + if ((i_r > 1 && i_r < grid_.nr() - 2) || (i_r == 1 && !DirBC_Interior_)) { + return stencil_interior_; + } + else if (i_r == 0 && !DirBC_Interior_) { + return stencil_across_origin_; + } + else if ((i_r == 0 && DirBC_Interior_) || i_r == grid_.nr() - 1) { + return stencil_DB_; + } + else if (i_r == 1 && DirBC_Interior_) { + return stencil_next_inner_DB_; + } + else if (i_r == grid_.nr() - 2) { + return stencil_next_outer_DB_; + } + throw std::out_of_range("Invalid index for stencil"); +} + +int DirectSolver::getNonZeroCountSolverMatrix() const +{ + const int size_stencil_inner_boundary = DirBC_Interior_ ? 1 : 7; + const int size_stencil_next_inner_boundary = DirBC_Interior_ ? 6 : 9; + const int size_stencil_interior = 9; + const int size_stencil_next_outer_boundary = 6; + const int size_stencil_outer_boundary = 1; + + assert(grid_.nr() >= 4); + + return grid_.ntheta() * + (size_stencil_inner_boundary + size_stencil_next_inner_boundary + (grid_.nr() - 4) * size_stencil_interior + + size_stencil_next_outer_boundary + size_stencil_outer_boundary); +} + +/* ----------------------------------------------------------------- */ +/* If the indexing is not smoother-based, please adjust the indexing */ +int DirectSolver::getSolverMatrixIndex(const int i_r, const int i_theta) const +{ + const int size_stencil_inner_boundary = DirBC_Interior_ ? 1 : 7; + const int size_stencil_next_inner_boundary = DirBC_Interior_ ? 6 : 9; + const int size_stencil_interior = 9; + const int size_stencil_next_outer_boundary = 6; + const int size_stencil_outer_boundary = 1; + + assert(grid_.nr() >= 4); + assert(grid_.numberSmootherCircles() >= 2); + assert(grid_.lengthSmootherRadial() >= 2); + + if (1 < i_r && i_r < grid_.numberSmootherCircles()) { + // Interior: Circle index section + const int prior_inner_boundary_nodes = grid_.ntheta(); + const int prior_next_inner_boundary_nodes = grid_.ntheta(); + const int prior_interior_nodes = (i_r - 2) * grid_.ntheta() + i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes + + size_stencil_next_inner_boundary * prior_next_inner_boundary_nodes + + size_stencil_interior * prior_interior_nodes; + } + if (i_r >= grid_.numberSmootherCircles() && i_r < grid_.nr() - 2) { + // Interior: Radial index section + const int prior_inner_boundary_nodes = grid_.ntheta(); + const int prior_next_inner_boundary_nodes = grid_.ntheta(); + const int prior_interior_nodes = grid_.ntheta() * (grid_.numberSmootherCircles() - 2) + + i_theta * (grid_.lengthSmootherRadial() - 2) + i_r - + grid_.numberSmootherCircles(); + const int prior_next_outer_boundary_nodes = i_theta; + const int prior_outer_boundary_nodes = i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes + + size_stencil_next_inner_boundary * prior_next_inner_boundary_nodes + + size_stencil_interior * prior_interior_nodes + + size_stencil_next_outer_boundary * prior_next_outer_boundary_nodes + + size_stencil_outer_boundary * prior_outer_boundary_nodes; + } + else if (i_r == 0) { + // Inner boundary + const int prior_inner_boundary_nodes = i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes; + } + else if (i_r == 1) { + // Next to inner boundary + const int prior_inner_boundary_nodes = grid_.ntheta(); + const int prior_next_inner_boundary_nodes = i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes + + size_stencil_next_inner_boundary * prior_next_inner_boundary_nodes; + } + else if (i_r == grid_.nr() - 2) { + // Next to outer boundary + const int prior_inner_boundary_nodes = grid_.ntheta(); + const int prior_next_inner_boundary_nodes = grid_.ntheta(); + const int prior_interior_nodes = + grid_.ntheta() * (grid_.numberSmootherCircles() - 2) + (i_theta + 1) * (grid_.lengthSmootherRadial() - 2); + const int prior_next_outer_boundary_nodes = i_theta; + const int prior_outer_boundary_nodes = i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes + + size_stencil_next_inner_boundary * prior_next_inner_boundary_nodes + + size_stencil_interior * prior_interior_nodes + + size_stencil_next_outer_boundary * prior_next_outer_boundary_nodes + + size_stencil_outer_boundary * prior_outer_boundary_nodes; + } + else if (i_r == grid_.nr() - 1) { + // Outer boundary + const int prior_inner_boundary_nodes = grid_.ntheta(); + const int prior_next_inner_boundary_nodes = grid_.ntheta(); + const int prior_interior_nodes = + grid_.ntheta() * (grid_.numberSmootherCircles() - 2) + (i_theta + 1) * (grid_.lengthSmootherRadial() - 2); + const int prior_next_outer_boundary_nodes = i_theta + 1; + const int prior_outer_boundary_nodes = i_theta; + return size_stencil_inner_boundary * prior_inner_boundary_nodes + + size_stencil_next_inner_boundary * prior_next_inner_boundary_nodes + + size_stencil_interior * prior_interior_nodes + + size_stencil_next_outer_boundary * prior_next_outer_boundary_nodes + + size_stencil_outer_boundary * prior_outer_boundary_nodes; + } + throw std::out_of_range("Invalid index for stencil"); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/buildAscMatrices.cpp b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/buildAscMatrices.cpp new file mode 100644 index 00000000..3771ac6f --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/buildAscMatrices.cpp @@ -0,0 +1,794 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +#define NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid, DirBC_Interior, inner_boundary_circle_matrix, \ + circle_diagonal_solver, circle_tridiagonal_solver, radial_diagonal_solver, \ + radial_tridiagonal_solver) \ + do { \ + assert(i_r >= 0 && i_r < grid.nr()); \ + assert(i_theta >= 0 && i_theta < grid.ntheta()); \ + \ + const int numberSmootherCircles = grid.numberSmootherCircles(); \ + const int lengthSmootherRadial = grid.lengthSmootherRadial(); \ + \ + assert(numberSmootherCircles >= 3); \ + assert(lengthSmootherRadial >= 3); \ + \ + int row, column; \ + double value; \ + /* ------------------------------------------ */ \ + /* Node in the interior of the Circle Section */ \ + /* ------------------------------------------ */ \ + if (i_r > 0 && i_r < numberSmootherCircles) { /* i_r = numberSmootherCircles-1 is included here! */ \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + int center_index = i_theta; \ + int bottom_index = i_theta_M1; \ + int top_index = i_theta_P1; \ + /* -------------------------- */ \ + /* Cyclic Tridiagonal Section */ \ + /* i_r % 2 == 1 */ \ + if (i_r & 1) { \ + /* i_theta % 2 == 1 */ \ + /* | X | O | X | */ \ + /* | | | | */ \ + /* | 0 | Õ | O | */ \ + /* | | | | */ \ + /* | X | O | X | */ \ + /* or */ \ + /* i_theta % 2 == 0 */ \ + /* | O | O | O | */ \ + /* | | | | */ \ + /* | X | Õ | X | */ \ + /* | | | | */ \ + /* | O | O | O | */ \ + \ + auto& matrix = circle_tridiagonal_solver[i_r / 2]; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Bottom */ \ + row = center_index; \ + column = bottom_index; \ + value = -coeff3 * (att[center] + att[bottom]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Top */ \ + row = center_index; \ + column = top_index; \ + value = -coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ---------------- */ \ + /* Diagonal Section */ \ + /* i_r % 2 == 0 */ \ + else { \ + /* i_theta % 2 == 1 */ \ + /* | O | X | O | */ \ + /* | | | | */ \ + /* | O | Õ | O | */ \ + /* | | | | */ \ + /* | O | X | O | */ \ + /* or */ \ + /* i_theta % 2 == 0 */ \ + /* | O | O | O | */ \ + /* | | | | */ \ + /* | O | X̃ | O | */ \ + /* | | | | */ \ + /* | O | O | O | */ \ + \ + auto& matrix = circle_diagonal_solver[i_r / 2]; \ + \ + if (i_theta & 1) { /* i_theta % 2 == 1 */ \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + matrix.diagonal(row) = value; \ + } \ + else { /* i_theta % 2 == 0 */ \ + /* Center: Coarse */ \ + auto& matrix = circle_diagonal_solver[i_r / 2]; \ + int center_index = i_theta; \ + \ + row = center_index; \ + column = center_index; \ + matrix.diagonal(row) = 1.0; \ + } \ + } \ + } \ + /* ------------------------------------------ */ \ + /* Circle Section: Node in the inner boundary */ \ + /* ------------------------------------------ */ \ + else if (i_r == 0) { \ + /* ------------------------------------------------ */ \ + /* Case 1: Dirichlet boundary on the inner boundary */ \ + /* ------------------------------------------------ */ \ + if (DirBC_Interior) { \ + auto& matrix = inner_boundary_circle_matrix; \ + int center_index = i_theta; \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r, i_theta); \ + int center_nz_index = getCircleAscIndex(i_r, i_theta); \ + int nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = center_index + 1; \ + matrix.value(nz_index) = 1.0; \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()/2)). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + double h1 = 2.0 * grid.radius(0); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + const int i_theta_AcrossOrigin = grid.wrapThetaIndex(i_theta + (grid.ntheta() / 2)); \ + \ + const int center_index = i_theta; \ + const int left_index = i_theta_AcrossOrigin; \ + const int right_index = i_theta; \ + const int bottom_index = i_theta_M1; \ + const int top_index = i_theta_P1; \ + \ + const int center_nz_index = getCircleAscIndex(i_r, i_theta); \ + const int bottom_nz_index = getCircleAscIndex(i_r, i_theta_M1); \ + const int top_nz_index = getCircleAscIndex(i_r, i_theta_P1); \ + const int left_nz_index = getCircleAscIndex(i_r, i_theta_AcrossOrigin); \ + \ + int nz_index; \ + const Stencil& CenterStencil = getStencil(i_r, i_theta); \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* -| X | O | X | */ \ + /* -| | | | */ \ + /* -| Õ | O | O | */ \ + /* -| | | | */ \ + /* -| X | O | X | */ \ + \ + const double h1 = 2.0 * grid.radius(0); \ + const double h2 = grid.radialSpacing(i_r); \ + const double k1 = grid.angularSpacing(i_theta - 1); \ + const double k2 = grid.angularSpacing(i_theta); \ + \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + const int i_theta_AcrossOrigin = grid.wrapThetaIndex(i_theta + grid.ntheta() / 2); \ + \ + const int left = grid.index(i_r, i_theta_AcrossOrigin); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = inner_boundary_circle_matrix; \ + \ + const int center_index = i_theta; \ + const int left_index = i_theta_AcrossOrigin; \ + \ + const int center_nz_index = getCircleAscIndex(i_r, i_theta); \ + \ + int nz_index; \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r, i_theta); \ + \ + const double center_value = \ + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + const double left_value = -coeff1 * (arr[center] + arr[left]); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = center_index + 1; \ + matrix.value(nz_index) = center_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = left_index + 1; \ + matrix.value(nz_index) = left_value; \ + } \ + else { \ + /* i_theta % 2 == 0 */ \ + /* -| O | O | O | */ \ + /* -| | | | */ \ + /* -| X̃ | O | X | */ \ + /* -| | | | */ \ + /* -| O | O | O | */ \ + \ + auto& matrix = inner_boundary_circle_matrix; \ + const int center_index = i_theta; \ + /* Fill matrix row of (i,j) */ \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = center_index + 1; \ + matrix.value(nz_index) = 1.0; \ + } \ + } \ + } \ + /* ------------------------------------------ */ \ + /* Node in the interior of the Radial Section */ \ + /* ------------------------------------------ */ \ + else if (i_r > numberSmootherCircles && i_r < grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + const int center_index = i_r - numberSmootherCircles; \ + const int left_index = i_r - numberSmootherCircles - 1; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + /* ------------------- */ \ + /* Tridiagonal Section */ \ + /* i_theta % 2 == 1 */ \ + if (i_theta & 1) { \ + /* i_r % 2 == 1 */ \ + /* ---------- */ \ + /* X O X */ \ + /* ---------- */ \ + /* O Õ O */ \ + /* ---------- */ \ + /* X O X */ \ + /* ---------- */ \ + /* or */ \ + /* i_r % 2 == 0 */ \ + /* ---------- */ \ + /* O X O */ \ + /* ---------- */ \ + /* O Õ O */ \ + /* ---------- */ \ + /* O X O */ \ + /* ---------- */ \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta / 2]; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Left */ \ + row = center_index; \ + column = left_index; \ + value = -coeff1 * (arr[center] + arr[left]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = -coeff2 * (arr[center] + arr[right]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ---------------- */ \ + /* Diagonal Section */ \ + /* i_theta % 2 == 0 */ \ + else { \ + /* i_r % 2 == 1 */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + /* X Õ X */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + /* or */ \ + /* i_r % 2 == 0 */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + /* O X̃ O */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + \ + auto& matrix = radial_diagonal_solver[i_theta / 2]; \ + \ + if (i_r & 1) { /* i_r % 2 == 1 */ \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + matrix.diagonal(row) = value; \ + } \ + else { /* i_r % 2 == 0 */ \ + /* Center: Coarse */ \ + row = center_index; \ + column = center_index; \ + matrix.diagonal(row) = 1.0; \ + } \ + } \ + } \ + /* --------------------------------------------- */ \ + /* Radial Section: Node next to circular section */ \ + /* --------------------------------------------- */ \ + else if (i_r == numberSmootherCircles) { \ + \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + const int center_index = i_r - numberSmootherCircles; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 and i_r % 2 == 1 */ \ + /* | X | O | X || O X O X */ \ + /* | | | || -------------- */ \ + /* | 0 | O | O || Õ O O O */ \ + /* | | | || -------------- */ \ + /* | X | O | X || O X O X */ \ + /* or */ \ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ \ + /* | O | X | O || X O X O */ \ + /* | | | || -------------- */ \ + /* | 0 | O | O || Õ O O O */ \ + /* | | | || -------------- */ \ + /* | O | X | O || X O X O */ \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta / 2]; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = -coeff2 * (arr[center] + arr[right]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + else { \ + \ + auto& matrix = radial_diagonal_solver[i_theta / 2]; \ + \ + if (i_r & 1) { \ + /* i_theta % 2 == 0 and i_r % 2 == 1 */ \ + /* | O | O | O || O O O O */ \ + /* | | | || -------------- */ \ + /* | X | O | X || Õ X O X */ \ + /* | | | || -------------- */ \ + /* | O | O | O || O O O O */ \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + matrix.diagonal(row) = value; \ + } \ + else { \ + /* i_theta % 2 == 0 and i_r % 2 == 0 */ \ + /* | O | O | O || O O O O */ \ + /* | | | || -------------- */ \ + /* | O | X | O || X̃ O X O */ \ + /* | | | || -------------- */ \ + /* | O | O | O || O O O O */ \ + /* Center: Coarse */ \ + row = center_index; \ + column = center_index; \ + matrix.diagonal(row) = 1.0; \ + } \ + } \ + } \ + /* ------------------------------------------- */ \ + /* Radial Section: Node next to outer boundary */ \ + /* ------------------------------------------- */ \ + else if (i_r == grid.nr() - 2) { \ + assert(i_r % 2 == 1); \ + \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + const int center_index = i_r - numberSmootherCircles; \ + const int left_index = i_r - numberSmootherCircles - 1; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* ---------------|| */ \ + /* O X O X || */ \ + /* ---------------|| */ \ + /* O O Õ O || */ \ + /* ---------------|| */ \ + /* O X O X || */ \ + /* ---------------|| */ \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta / 2]; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Left */ \ + row = center_index; \ + column = left_index; \ + value = -coeff1 * (arr[center] + arr[left]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = 0.0; /* Make tridiagonal matrix symmetric */ \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + else { \ + /* i_theta % 2 == 0 */ \ + /* ---------------|| */ \ + /* O O O O || */ \ + /* ---------------|| */ \ + /* O X Õ X || */ \ + /* ---------------|| */ \ + /* O O O O || */ \ + /* ---------------|| */ \ + \ + auto& matrix = radial_diagonal_solver[i_theta / 2]; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + matrix.diagonal(row) = value; \ + } \ + } \ + /* ------------------------------------------ */ \ + /* Radial Section: Node on the outer boundary */ \ + /* ------------------------------------------ */ \ + else if (i_r == grid.nr() - 1) { \ + assert(!i_r % 2 == 0); \ + \ + int center_index = i_r - numberSmootherCircles; \ + int left_index = i_r - numberSmootherCircles - 1; \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* -----------|| */ \ + /* X O X || */ \ + /* -----------|| */ \ + /* O O Õ || */ \ + /* -----------|| */ \ + /* X O X || */ \ + /* -----------|| */ \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta / 2]; \ + \ + /* Fill matrix row of (i,j) */ \ + row = center_index; \ + column = center_index; \ + value = 1.0; \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + row = center_index; \ + column = left_index; \ + value = 0.0; /* Make tridiagonal matrix symmetric */ \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + else { \ + /* i_theta % 2 == 0 */ \ + /* -----------|| */ \ + /* O O O || */ \ + /* -----------|| */ \ + /* X O X̃ || */ \ + /* -----------|| */ \ + /* O O O || */ \ + /* -----------|| */ \ + \ + auto& matrix = radial_diagonal_solver[i_theta / 2]; \ + \ + /* Fill matrix row of (i,j) */ \ + row = center_index; \ + column = center_index; \ + matrix.diagonal(row) = 1.0; \ + } \ + } \ + } while (0) + + +void ExtrapolatedSmootherTakeCPU::buildAscCircleSection(const int i_r) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + // Build Asc at the current node + NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid_, DirBC_Interior_, inner_boundary_circle_matrix_, + circle_diagonal_solver_, circle_tridiagonal_solver_, radial_diagonal_solver_, + radial_tridiagonal_solver_); + } +} + +void ExtrapolatedSmootherTakeCPU::buildAscRadialSection(const int i_theta) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + // Build Asc at the current node + NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid_, DirBC_Interior_, inner_boundary_circle_matrix_, + circle_diagonal_solver_, circle_tridiagonal_solver_, radial_diagonal_solver_, + radial_tridiagonal_solver_); + } +} + +void ExtrapolatedSmootherTakeCPU::buildAscMatrices() +{ + /* -------------------------------------- */ + /* Part 1: Allocate Asc Smoother matrices */ + /* -------------------------------------- */ + + const int number_smoother_circles = grid_.numberSmootherCircles(); + const int length_smoother_radial = grid_.lengthSmootherRadial(); + + const int num_circle_nodes = grid_.ntheta(); + circle_tridiagonal_solver_.resize(number_smoother_circles / 2); + circle_diagonal_solver_.resize(number_smoother_circles - number_smoother_circles / 2); + + assert((grid_.ntheta() / 2) % 2 == 0); + const int num_radial_nodes = length_smoother_radial; + radial_tridiagonal_solver_.resize(grid_.ntheta() / 2); + radial_diagonal_solver_.resize(grid_.ntheta() / 2); + +// Remark: circle_diagonal_solver_[0] is undefnied. +// Use inner_boundary_circle_matrix_ instead. +#pragma omp parallel if (grid_.numberOfNodes() > 10'000) + { +// ---------------- // +// Circular Section // +#pragma omp for nowait + for (int circle_Asc_index = 0; circle_Asc_index < number_smoother_circles; circle_Asc_index++) { + + /* Inner boundary circle */ + if (circle_Asc_index == 0) { + // Although the matrix is symmetric, we need to store all its entries, so we disable the symmetry. + const int nnz = getNonZeroCountCircleAsc(circle_Asc_index); + inner_boundary_circle_matrix_ = SparseMatrix(num_circle_nodes, num_circle_nodes, nnz); + inner_boundary_circle_matrix_.is_symmetric(false); + } + + /* Interior Circle Section */ + else { + if (circle_Asc_index & 1) { + const int circle_tridiagonal_solver_index = circle_Asc_index / 2; + auto& solver_matrix = circle_tridiagonal_solver_[circle_tridiagonal_solver_index]; + solver_matrix = SymmetricTridiagonalSolver(num_circle_nodes); + solver_matrix.is_cyclic(true); + } + else { + const int circle_diagonal_solver_index = circle_Asc_index / 2; + auto& solver_matrix = circle_diagonal_solver_[circle_diagonal_solver_index]; + solver_matrix = DiagonalSolver(num_circle_nodes); + } + } + } + +// -------------- // +// Radial Section // +#pragma omp for nowait + for (int radial_Asc_index = 0; radial_Asc_index < grid_.ntheta(); radial_Asc_index++) { + if (radial_Asc_index & 1) { + const int radial_tridiagonal_solver_index = radial_Asc_index / 2; + auto& solver_matrix = radial_tridiagonal_solver_[radial_tridiagonal_solver_index]; + solver_matrix = SymmetricTridiagonalSolver(num_radial_nodes); + solver_matrix.is_cyclic(false); + } + else { + const int radial_diagonal_solver_index = radial_Asc_index / 2; + auto& solver_matrix = radial_diagonal_solver_[radial_diagonal_solver_index]; + solver_matrix = DiagonalSolver(num_radial_nodes); + } + } + } + + /* ---------------------------------- */ + /* Part 2: Fill Asc Smoother matrices */ + /* ---------------------------------- */ + +#pragma omp parallel + { +#pragma omp for nowait + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + buildAscCircleSection(i_r); + } + +#pragma omp for nowait + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + buildAscRadialSection(i_theta); + } + } + + /* ------------------------------------------------------------------- */ + /* Part 3: Convert inner_boundary_circle_matrix_ to a symmetric matrix */ + /* ------------------------------------------------------------------- */ + + SparseMatrix full_matrix = std::move(inner_boundary_circle_matrix_); + + const int nnz = full_matrix.non_zero_size(); + const int numRows = full_matrix.rows(); + const int numColumns = full_matrix.columns(); + const int symmetric_nnz = nnz - (nnz - numRows) / 2; + + inner_boundary_circle_matrix_ = SparseMatrix(numRows, numColumns, symmetric_nnz); + inner_boundary_circle_matrix_.is_symmetric(true); + + int current_nz = 0; + for (int nz_index = 0; nz_index < full_matrix.non_zero_size(); nz_index++) { + int current_row = full_matrix.row_index(nz_index); + int current_col = full_matrix.col_index(nz_index); + if (current_row <= current_col) { + inner_boundary_circle_matrix_.row_index(current_nz) = current_row; + inner_boundary_circle_matrix_.col_index(current_nz) = current_col; + inner_boundary_circle_matrix_.value(current_nz) = std::move(full_matrix.value(nz_index)); + current_nz++; + } + } +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.cpp b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.cpp new file mode 100644 index 00000000..2c9cd710 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.cpp @@ -0,0 +1,18 @@ +#include "../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +ExtrapolatedSmootherTakeCPU::ExtrapolatedSmootherTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, const bool DirBC_Interior) + : grid_(level.grid()) + , level_cache_(level.levelCache()) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) +{ + buildAscMatrices(); + initializeMumpsSolver(inner_boundary_mumps_solver_, inner_boundary_circle_matrix_); +} + +ExtrapolatedSmootherTakeCPU::~ExtrapolatedSmootherTakeCPU() +{ + finalizeMumpsSolver(inner_boundary_mumps_solver_); +} diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/initializeMumps.cpp b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/initializeMumps.cpp new file mode 100644 index 00000000..8a69e275 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/initializeMumps.cpp @@ -0,0 +1,99 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +void ExtrapolatedSmootherTakeCPU::initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, + const SparseMatrix& solver_matrix) +{ + mumps_solver.job = JOB_INIT; + mumps_solver.par = PAR_PARALLEL; + /* The matrix is positive definite for invertible mappings. */ + /* Therefore we use SYM_POSITIVE_DEFINITE instead of SYM_GENERAL_SYMMETRIC. */ + mumps_solver.sym = (solver_matrix.is_symmetric() ? SYM_POSITIVE_DEFINITE : SYM_UNSYMMETRIC); + mumps_solver.comm_fortran = USE_COMM_WORLD; + dmumps_c(&mumps_solver); + + mumps_solver.ICNTL(1) = 0; // Output stream for error messages. + mumps_solver.ICNTL(2) = 0; // Output stream for diagnostic printing and statistics local to each MPI process. + mumps_solver.ICNTL(3) = 0; // Output stream for global information, collected on the host + mumps_solver.ICNTL(4) = 0; // Level of printing for error, warning, and diagnostic messages. + mumps_solver.ICNTL(5) = 0; // Controls the matrix input format + mumps_solver.ICNTL(6) = 7; // Permutes the matrix to a zero-free diagonal and/or scale the matrix + mumps_solver.ICNTL(7) = + 5; // Computes a symmetric permutation (ordering) to determine the pivot order to be used for the + // factorization in case of sequential analysis + mumps_solver.ICNTL(8) = 77; // Describes the scaling strategy + mumps_solver.ICNTL(9) = 1; // Computes the solution using A or A^T + mumps_solver.ICNTL(10) = 0; // Applies the iterative refinement to the computed solution + mumps_solver.ICNTL(11) = 0; // Computes statistics related to an error analysis of the linear system solved + mumps_solver.ICNTL(12) = 0; // Defines an ordering strategy for symmetric matrices and is used + mumps_solver.ICNTL(13) = 0; // Controls the parallelism of the root node + mumps_solver.ICNTL(14) = // Controls the percentage increase in the estimated working space + (solver_matrix.is_symmetric() ? 5 : 20); + mumps_solver.ICNTL(15) = 0; // Exploits compression of the input matrix resulting from a block format + mumps_solver.ICNTL(16) = 0; // Controls the setting of the number of OpenMP threads + // ICNTL(17) Doesn't exist + mumps_solver.ICNTL(18) = 0; // Defines the strategy for the distributed input matrix + mumps_solver.ICNTL(19) = 0; // Computes the Schur complement matrix + mumps_solver.ICNTL(20) = 0; // Determines the format (dense, sparse, or distributed) of the right-hand sides + mumps_solver.ICNTL(21) = 0; // Determines the distribution (centralized or distributed) of the solution vectors. + mumps_solver.ICNTL(22) = 0; // Controls the in-core/out-of-core (OOC) factorization and solve. + mumps_solver.ICNTL(23) = 0; // Corresponds to the maximum size of the working memory in MegaBytes that MUMPS can + // allocate per working process + mumps_solver.ICNTL(24) = 0; // Controls the detection of “null pivot rows”. + mumps_solver.ICNTL(25) = + 0; // Allows the computation of a solution of a deficient matrix and also of a null space basis + mumps_solver.ICNTL(26) = 0; // Drives the solution phase if a Schur complement matrix has been computed + mumps_solver.ICNTL(27) = -32; // Controls the blocking size for multiple right-hand sides. + mumps_solver.ICNTL(28) = 0; // Determines whether a sequential or parallel computation of the ordering is performed + mumps_solver.ICNTL(29) = + 0; // Defines the parallel ordering tool (when ICNTL(28)=1) to be used to compute the fill-in reducing permutation. + mumps_solver.ICNTL(30) = 0; // Computes a user-specified set of entries in the inverse A^−1 of the original matrix + mumps_solver.ICNTL(31) = 0; // Indicates which factors may be discarded during the factorization. + mumps_solver.ICNTL(32) = 0; // Performs the forward elimination of the right-hand sides during the factorization + mumps_solver.ICNTL(33) = 0; // Computes the determinant of the input matrix. + mumps_solver.ICNTL(34) = 0; // Controls the conservation of the OOC files during JOB= –3 + mumps_solver.ICNTL(35) = 0; // Controls the activation of the BLR feature + mumps_solver.ICNTL(36) = 0; // Controls the choice of BLR factorization variant + mumps_solver.ICNTL(37) = 0; // Controls the BLR compression of the contribution blocks + mumps_solver.ICNTL(38) = 600; // Estimates compression rate of LU factors + mumps_solver.ICNTL(39) = 500; // Estimates compression rate of contribution blocks + // ICNTL(40-47) Don't exist + mumps_solver.ICNTL(48) = 1; // Multithreading with tree parallelism + mumps_solver.ICNTL(49) = 0; // Compact workarray id%S at the end of factorization phase + // ICNTL(50-55) Don't exist + mumps_solver.ICNTL(56) = + 0; // Detects pseudo-singularities during factorization and factorizes the root node with a rankrevealing method + // ICNTL(57) Doesn't exist + mumps_solver.ICNTL(58) = 2; // Defines options for symbolic factorization + // ICNTL(59-60) Don't exist + + mumps_solver.CNTL(1) = -1.0; // Relative threshold for numerical pivoting + mumps_solver.CNTL(2) = -1.0; // Stopping criterion for iterative refinement + mumps_solver.CNTL(3) = 0.0; // Determine null pivot rows + mumps_solver.CNTL(4) = -1.0; // Determines the threshold for static pivoting + mumps_solver.CNTL(5) = + 0.0; // Defines the fixation for null pivots and is effective only when null pivot row detection is active + // CNTL(6) Doesn't exist + mumps_solver.CNTL(7) = 0.0; // Defines the precision of the dropping parameter used during BLR compression + // CNTL(8-15) Don't exist + + mumps_solver.job = JOB_ANALYSIS_AND_FACTORIZATION; + assert(solver_matrix.rows() == solver_matrix.columns()); + mumps_solver.n = solver_matrix.rows(); + mumps_solver.nz = solver_matrix.non_zero_size(); + mumps_solver.irn = solver_matrix.row_indices_data(); + mumps_solver.jcn = solver_matrix.column_indices_data(); + mumps_solver.a = solver_matrix.values_data(); + dmumps_c(&mumps_solver); + + if (mumps_solver.sym == SYM_POSITIVE_DEFINITE && mumps_solver.INFOG(12) != 0) { + std::cout << "Warning: ExtrapolatedSmoother inner boundary matrix is not positive definite: Negative pivots in " + "the factorization phase." + << std::endl; + } +} + +void ExtrapolatedSmootherTakeCPU::finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver) +{ + mumps_solver.job = JOB_END; + dmumps_c(&mumps_solver); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherSolver.cpp b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherSolver.cpp new file mode 100644 index 00000000..eed4c523 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherSolver.cpp @@ -0,0 +1,574 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +/* The current position is marked with a ~ symbol. */ +#define NODE_APPLY_ASC_ORTHO_CIRCLE_TAKE(i_r, i_theta, grid, DirBC_Interior, smoother_color, x, rhs, temp, arr, att, \ + art, detDF, coeff_beta) \ + do { \ + assert(i_r >= 0 && i_r <= grid_.numberSmootherCircles()); \ + /* -------------------- */ \ + /* Node in the interior */ \ + /* -------------------- */ \ + if (i_r > 0 && i_r < grid.numberSmootherCircles()) { \ + /* -------------------------- */ \ + /* Cyclic Tridiagonal Section */ \ + /* i_r % 2 == 1 */ \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + if (i_r & 1) { \ + /* i_r % 2 == 1 and i_theta % 2 == 1 */ \ + /* | X | O | X | */ \ + /* | | | | */ \ + /* | O | Õ | O | */ \ + /* | | | | */ \ + /* | X | O | X | */ \ + /* or */ \ + /* i_r % 2 == 1 and i_theta % 2 == 0 */ \ + /* | O | O | O | */ \ + /* | | | | */ \ + /* | X | Õ | X | */ \ + /* | | | | */ \ + /* | O | O | O | */ \ + temp[center] = rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + if (i_theta & 1) { \ + /* i_r % 2 == 0 and i_theta % 2 == 1 */ \ + /* | O | X | O | */ \ + /* | | | | */ \ + /* | O | Õ | O | */ \ + /* | | | | */ \ + /* | O | X | O | */ \ + /* Fill temp(i,j) */ \ + temp[center] = \ + rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + /* i_r % 2 == 0 and i_theta % 2 == 0 */ \ + /* | O | O | O | */ \ + /* | | | | */ \ + /* | O | X̃ | O | */ \ + /* | | | | */ \ + /* | O | O | O | */ \ + temp[center] = x[center]; \ + } \ + } \ + } \ + /* -------------------- */ \ + /* Node on the boundary */ \ + /* -------------------- */ \ + else if (i_r == 0) { \ + /* ------------------------------------------------ */ \ + /* Case 1: Dirichlet boundary on the inner boundary */ \ + /* ------------------------------------------------ */ \ + const int center = grid.index(i_r, i_theta); \ + if (DirBC_Interior) { \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* || X | O | X | */ \ + /* || | | | */ \ + /* || Õ | O | O | */ \ + /* || | | | */ \ + /* || X | O | X | */ \ + temp[center] = rhs[center]; \ + } \ + else { \ + /* i_theta % 2 == 0 */ \ + /* || O | O | O | */ \ + /* || | | | */ \ + /* || X̃ | O | X | */ \ + /* || | | | */ \ + /* || O | O | O | */ \ + temp[center] = x[center]; \ + } \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + double h1 = 2.0 * grid.radius(0); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid_.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid_.wrapThetaIndex(i_theta + 1); \ + const int i_theta_Across = grid_.wrapThetaIndex(i_theta + grid_.ntheta() / 2); \ + \ + const int left = grid_.index(i_r, i_theta_Across); \ + const int bottom = grid_.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid_.index(i_r, i_theta_P1); \ + const int bottom_right = grid_.index(i_r + 1, i_theta_M1); \ + const int right = grid_.index(i_r + 1, i_theta); \ + const int top_right = grid_.index(i_r + 1, i_theta_P1); \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* -| X | O | X | */ \ + /* -| | | | */ \ + /* -| Õ | O | O | */ \ + /* -| | | | */ \ + /* -| X | O | X | */ \ + temp[center] = \ + rhs[center] - \ + (-coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + /* - 0.25 * (art[left] + art[bottom]) * x[bottom_left] // Bottom Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + + \ + 0.25 * (art[right] + art[bottom]) * \ + x[bottom_right] /* Bottom Right */ /* + 0.25 * (art[left] + art[top]) * x[top_left] // Top Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + /* i_theta % 2 == 0 */ \ + /* -| O | O | O | */ \ + /* -| | | | */ \ + /* -| X̃ | O | X | */ \ + /* -| | | | */ \ + /* -| O | O | O | */ \ + temp[center] = x[center]; \ + } \ + } \ + } \ + } while (0) + +#define NODE_APPLY_ASC_ORTHO_RADIAL_TAKE(i_r, i_theta, grid, DirBC_Interior, smoother_color, x, rhs, temp, arr, att, \ + art, detDF, coeff_beta) \ + do { \ + assert(i_r >= grid.numberSmootherCircles() - 1 && i_r < grid.nr()); \ + /* -------------------- */ \ + /* Node in the interior */ \ + /* -------------------- */ \ + if (i_r > grid.numberSmootherCircles() && i_r < grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 and i_r % 2 == 1 */ \ + /* ---------- */ \ + /* X O X */ \ + /* ---------- */ \ + /* O Õ O */ \ + /* ---------- */ \ + /* X O X */ \ + /* ---------- */ \ + /* or */ \ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ \ + /* ---------- */ \ + /* O X O */ \ + /* ---------- */ \ + /* O Õ O */ \ + /* ---------- */ \ + /* O X O */ \ + /* ---------- */ \ + temp[center] = rhs[center] - (-coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + if (i_r & 1) { \ + /* i_theta % 2 == 0 and i_r % 2 == 1 */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + /* X Õ X */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + temp[center] = \ + rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + /* i_theta % 2 == 0 and i_r % 2 == 0 */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + /* O X̃ O */ \ + /* ---------- */ \ + /* O O O */ \ + /* ---------- */ \ + temp[center] = x[center]; \ + } \ + } \ + } \ + else if (i_r == grid.numberSmootherCircles()) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 and i_r % 2 == 1 */ \ + /* | X | O | X || O X O X */ \ + /* | | | || -------------- */ \ + /* | 0 | O | O || Õ O O O */ \ + /* | | | || -------------- */ \ + /* | X | O | X || O X O X */ \ + /* or */ \ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ \ + /* | O | X | O || X O X O */ \ + /* | | | || -------------- */ \ + /* | 0 | O | O || Õ O O O */ \ + /* | | | || -------------- */ \ + /* | O | X | O || X O X O */ \ + temp[center] = rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + if (i_r & 1) { \ + /* i_theta % 2 == 0 and i_r % 2 == 1 */ \ + /* | O | O | O || O O O O */ \ + /* | | | || -------------- */ \ + /* | X | O | X || Õ X O X */ \ + /* | | | || -------------- */ \ + /* | O | O | O || O O O O */ \ + temp[center] = \ + rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + /* i_theta % 2 == 0 and i_r % 2 == 0 */ \ + /* | O | O | O || O O O O */ \ + /* | | | || -------------- */ \ + /* | O | X | O || X̃ O X O */ \ + /* | | | || -------------- */ \ + /* | O | O | O || O O O O */ \ + temp[center] = x[center]; \ + } \ + } \ + } \ + else if (i_r == grid.nr() - 2) { \ + assert(i_r & 1); \ + \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* ---------------|| */ \ + /* O X O X || */ \ + /* ---------------|| */ \ + /* O O Õ O || */ \ + /* ---------------|| */ \ + /* O X O X || */ \ + /* ---------------|| */ \ + /* "Right" is part of the radial Asc smoother matrices, */ \ + /* but is shifted over to the rhs to make the radial Asc smoother matrices symmetric. */ \ + /* Note that the circle Asc smoother matrices are symmetric by default. */ \ + temp[center] = \ + rhs[center] - (-coeff2 * (arr[center] + arr[right]) * rhs[right] /* Right: Symmetry shift! */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else { \ + /* ---------------|| */ \ + /* O O O O || */ \ + /* ---------------|| */ \ + /* O X Õ X || */ \ + /* ---------------|| */ \ + /* O O O O || */ \ + /* ---------------|| */ \ + temp[center] = rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + } \ + else if (i_r == grid.nr() - 1) { \ + assert(!(i_r & 1)); \ + \ + const int center = grid.index(i_r, i_theta); \ + if (i_theta & 1) { \ + /* i_theta % 2 == 1 */ \ + /* -----------|| */ \ + /* X O X || */ \ + /* -----------|| */ \ + /* O O Õ || */ \ + /* -----------|| */ \ + /* X O X || */ \ + /* -----------|| */ \ + temp[center] = rhs[center]; \ + } \ + else { \ + /* -----------|| */ \ + /* O O O || */ \ + /* -----------|| */ \ + /* X O X̃ || */ \ + /* -----------|| */ \ + /* O O O || */ \ + /* -----------|| */ \ + temp[center] = x[center]; \ + } \ + } \ + } while (0) + +void ExtrapolatedSmootherTakeCPU::applyAscOrthoCircleSection(const int i_r, const SmootherColor smoother_color, + const Vector& x, const Vector& rhs, + Vector& temp) +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + NODE_APPLY_ASC_ORTHO_CIRCLE_TAKE(i_r, i_theta, grid_, DirBC_Interior_, smoother_color, x, rhs, temp, arr, att, + art, detDF, coeff_beta); + } +} + +void ExtrapolatedSmootherTakeCPU::applyAscOrthoRadialSection(const int i_theta, const SmootherColor smoother_color, + const Vector& x, const Vector& rhs, + Vector& temp) +{ + assert(i_theta >= 0 && i_theta < grid_.ntheta()); + + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + NODE_APPLY_ASC_ORTHO_RADIAL_TAKE(i_r, i_theta, grid_, DirBC_Interior_, smoother_color, x, rhs, temp, arr, att, + art, detDF, coeff_beta); + } +} + +void ExtrapolatedSmootherTakeCPU::solveCircleSection(const int i_r, Vector& x, Vector& temp, + Vector& solver_storage_1, Vector& solver_storage_2) +{ + const int start = grid_.index(i_r, 0); + const int end = start + grid_.ntheta(); + if (i_r == 0) { + inner_boundary_mumps_solver_.job = JOB_COMPUTE_SOLUTION; + inner_boundary_mumps_solver_.nrhs = 1; // single rhs vector + inner_boundary_mumps_solver_.nz_rhs = grid_.ntheta(); // non-zeros in rhs + inner_boundary_mumps_solver_.rhs = temp.begin() + start; + inner_boundary_mumps_solver_.lrhs = grid_.ntheta(); // leading dimension of rhs + dmumps_c(&inner_boundary_mumps_solver_); + if (inner_boundary_mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the system: " << inner_boundary_mumps_solver_.info[0] << std::endl; + } + } + else { + if (i_r & 1) { + circle_tridiagonal_solver_[i_r / 2].solveInPlace(temp.begin() + start, solver_storage_1.begin(),solver_storage_2.begin()); + } + else { + circle_diagonal_solver_[i_r / 2].solveInPlace(temp.begin() + start); + } + } + // Move updated values to x + std::move(temp.begin() + start, temp.begin() + end, x.begin() + start); +} + +void ExtrapolatedSmootherTakeCPU::solveRadialSection(const int i_theta, Vector& x, Vector& temp, + Vector& solver_storage) +{ + const int start = grid_.index(grid_.numberSmootherCircles(), i_theta); + const int end = start + grid_.lengthSmootherRadial(); + if (i_theta & 1) { + radial_tridiagonal_solver_[i_theta / 2].solveInPlace(temp.begin() + start, solver_storage.begin()); + } + else { + radial_diagonal_solver_[i_theta / 2].solveInPlace(temp.begin() + start); + } + // Move updated values to x + std::move(temp.begin() + start, temp.begin() + end, x.begin() + start); +} + +void ExtrapolatedSmootherTakeCPU::extrapolatedSmoothingInPlace(Vector& x, const Vector& rhs, + Vector& temp) +{ + assert(x.size() == rhs.size()); + assert(temp.size() == rhs.size()); + +#pragma omp parallel + { + Vector circle_solver_storage_1(grid_.ntheta()); + Vector circle_solver_storage_2(grid_.ntheta()); + Vector radial_solver_storage(grid_.lengthSmootherRadial()); + + /* The outer most circle next to the radial section is defined to be black. */ + /* Priority: Black -> White. */ + const int start_black_circles = (grid_.numberSmootherCircles() % 2 == 0) ? 1 : 0; + const int start_white_circles = (grid_.numberSmootherCircles() % 2 == 0) ? 0 : 1; + +/* Black Circle Section */ +#pragma omp for + for (int i_r = start_black_circles; i_r < grid_.numberSmootherCircles(); i_r += 2) { + applyAscOrthoCircleSection(i_r, SmootherColor::Black, x, rhs, temp); + solveCircleSection(i_r, x, temp, circle_solver_storage_1, circle_solver_storage_2); + } /* Implicit barrier */ + +/* White Circle Section */ +#pragma omp for nowait + for (int i_r = start_white_circles; i_r < grid_.numberSmootherCircles(); i_r += 2) { + applyAscOrthoCircleSection(i_r, SmootherColor::White, x, rhs, temp); + solveCircleSection(i_r, x, temp, circle_solver_storage_1, circle_solver_storage_2); + } +/* Black Radial Section */ +#pragma omp for + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta += 2) { + applyAscOrthoRadialSection(i_theta, SmootherColor::Black, x, rhs, temp); + solveRadialSection(i_theta, x, temp, radial_solver_storage); + } /* Implicit barrier */ + +/* White Radial Section*/ +#pragma omp for + for (int i_theta = 1; i_theta < grid_.ntheta(); i_theta += 2) { + applyAscOrthoRadialSection(i_theta, SmootherColor::White, x, rhs, temp); + solveRadialSection(i_theta, x, temp, radial_solver_storage); + } /* Implicit barrier */ + } +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherStencil.cpp b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherStencil.cpp new file mode 100644 index 00000000..1dcb3c82 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/smootherStencil.cpp @@ -0,0 +1,75 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" + +const Stencil& ExtrapolatedSmootherTakeCPU::getStencil(int i_r, int i_theta) const +{ + assert(0 <= i_r && i_r < grid_.nr()); + + assert((grid_.ntheta() / 2) % 2 == 0); + + if (i_r == 0) { + if (i_theta % 2 == 0) { + return stencil_center_; + } + else { + if (!DirBC_Interior_) { + return stencil_center_left_; + } + else { + return stencil_center_; + } + } + } + + throw std::out_of_range("getStencil: Only i_r = 0 implemented."); +} + +int ExtrapolatedSmootherTakeCPU::getNonZeroCountCircleAsc(const int i_r) const +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + assert((grid_.ntheta() / 2) % 2 == 0); + + if (i_r == 0) { + if (!DirBC_Interior_) { + return grid_.ntheta() / 2 + 2 * (grid_.ntheta() / 2); + } + else { + return grid_.ntheta(); + } + } + + throw std::out_of_range("nnz_circle_Asc: Only i_r = 0 implemented."); +} + +int ExtrapolatedSmootherTakeCPU::getCircleAscIndex(const int i_r, const int i_theta) const +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + assert((grid_.ntheta() / 2) % 2 == 0); + + if (i_r == 0) { + if (!DirBC_Interior_) { + if (i_theta % 2 == 0) { + return 3 * (i_theta / 2); + } + else { + return 3 * (i_theta / 2) + 1; + } + } + else { + return i_theta; + } + } + + throw std::out_of_range("ptr_nz_index_circle_Asc: Only i_r = 0 implemented."); +} + +int ExtrapolatedSmootherTakeCPU::getNonZeroCountRadialAsc(const int i_theta) const +{ + throw std::out_of_range("ExtrapolatedSmoother: nnz_radial_Asc not implemented."); +} + +int ExtrapolatedSmootherTakeCPU::getRadialAscIndex(const int i_r, const int i_theta) const +{ + throw std::out_of_range("ExtrapolatedSmoother: ptr_nz_index_radial_Asc not implemented."); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/0_constructor.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/0_constructor.cu new file mode 100644 index 00000000..65cdc7d9 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/0_constructor.cu @@ -0,0 +1,174 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +/* Constructor */ + +ExtrapolatedSmootherTakeGPU::ExtrapolatedSmootherTakeGPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, bool DirBC_Interior) + /* Constructor Members */ + : level_(level) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) + /* Circle Tridiagonal Matrices */ + , circle_main_diagonals_(nullptr) + , circle_lower_diagonals_(nullptr) + , circle_upper_diagonals_(nullptr) + , sherman_morrison_gammas_(nullptr) + /* Radial Tridiagonal Matrices */ + , radial_main_diagonals_(nullptr) + , radial_lower_diagonals_(nullptr) + , radial_upper_diagonals_(nullptr) + /* Tridiagonal Solver Buffer */ + , pBuffer_(nullptr) + /* Inner Boundary Mumps COO Matrix */ + , inner_boundary_matrix_row_indices_(nullptr) + , inner_boundary_matrix_column_indices_(nullptr) + , inner_boundary_matrix_values_(nullptr) + , d_inner_boundary_matrix_row_indices_(nullptr) + , d_inner_boundary_matrix_column_indices_(nullptr) + , d_inner_boundary_matrix_values_(nullptr) +{ + const PolarGrid& grid = level.grid(); + + int nr = grid.nr(); + int ntheta = grid.ntheta(); + int number_smoother_circles = grid.numberSmootherCircles(); + int length_smoother_radial = grid.lengthSmootherRadial(); + + int circle_batch_count = number_smoother_circles; + int circle_m = ntheta; + /* Cyclic Tridiagonal Circle Matrices */ + cudaMalloc(&circle_lower_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_lower_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + cudaMalloc(&circle_main_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_main_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + cudaMalloc(&circle_upper_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_upper_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + /* Cuda does not supply a cyclic tridiagonal solver. */ + /* Thus we use the Sherman–Morrison formula to reduce the problem to a simple tridiagonal problem with two right hand sides. */ + cudaMalloc(&sherman_morrison_gammas_, circle_batch_count * sizeof(double)); + cudaMemset(sherman_morrison_gammas_, 0, circle_batch_count * sizeof(double)); + cudaMalloc(&factor_, circle_batch_count * sizeof(double)); + cudaMemset(factor_, 0, circle_batch_count * sizeof(double)); + /* Remark: The 1st cylic tridiagonal matrix on the interior boundary is unused. */ + + int radial_batch_count = ntheta; + int radial_m = length_smoother_radial; + /* Tridiagonal Radial Matrices */ + cudaMalloc(&radial_lower_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_lower_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + cudaMalloc(&radial_main_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_main_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + cudaMalloc(&radial_upper_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_upper_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + + /* Tridiaginal Cuda Solver */ + cusparseCreate(&sparse_handle_); + + /* Allocate Tridiagonal Solver Buffer. */ + size_t bufferSizeInBytes_Circle; + cusparseDgtsv2StridedBatch_bufferSizeExt( + sparse_handle_, ntheta, nullptr, nullptr, nullptr, nullptr, + number_smoother_circles / 2, 2 * ntheta, &bufferSizeInBytes_Circle); + + size_t bufferSizeInBytes_Radial; + cusparseDgtsv2StridedBatch_bufferSizeExt( + sparse_handle_, length_smoother_radial, nullptr, nullptr, nullptr, nullptr, + ntheta / 2, 2 * length_smoother_radial, &bufferSizeInBytes_Radial); + + /* The Tridiagonal solvers require 5 * batch_count * m * sizeof(double) bytes. */ + /* Alternatively use four different pBuffers for each tridiagonal batch solver. */ + size_t max_pBufferSizeInBytes = std::max(bufferSizeInBytes_Circle, bufferSizeInBytes_Radial); + cudaMalloc(&pBuffer_, max_pBufferSizeInBytes); + + /* Inner Boundary Mumps COO Matrix */ + inner_boundary_matrix_nnz_ = DirBC_Interior_ ? grid.ntheta() : grid.ntheta() / 2 + 2 * (grid.ntheta() / 2); + + inner_boundary_matrix_row_indices_ = std::make_unique(inner_boundary_matrix_nnz_); + inner_boundary_matrix_column_indices_ = std::make_unique(inner_boundary_matrix_nnz_); + inner_boundary_matrix_values_ = std::make_unique(inner_boundary_matrix_nnz_); + + cudaMalloc(&d_inner_boundary_matrix_row_indices_, inner_boundary_matrix_nnz_ * sizeof(int)); + cudaMemset(d_inner_boundary_matrix_row_indices_, 0, inner_boundary_matrix_nnz_* sizeof(int)); + cudaMalloc(&d_inner_boundary_matrix_column_indices_, inner_boundary_matrix_nnz_ * sizeof(int)); + cudaMemset(d_inner_boundary_matrix_column_indices_, 0, inner_boundary_matrix_nnz_* sizeof(int)); + cudaMalloc(&d_inner_boundary_matrix_values_, inner_boundary_matrix_nnz_ * sizeof(double)); + cudaMemset(d_inner_boundary_matrix_values_, 0, inner_boundary_matrix_nnz_* sizeof(double)); + + /* Build Smoother Matrices we have allocated. */ + buildAscMatrices(); + + initializeMumps(); + + /* The cyclic tridiagonal Matrices need to be adjusted to a system of a non-cyclic tridiagonal matrices. */ + adjustAscCircle_ShermanMorrison(); +} + + + +/* Destructor */ + +ExtrapolatedSmootherTakeGPU::~ExtrapolatedSmootherTakeGPU() { + /* Cyclic Tridiagonal Circle Matrices */ + if (circle_lower_diagonals_) { + cudaFree(circle_lower_diagonals_); + circle_lower_diagonals_ = nullptr; + } + if (circle_main_diagonals_) { + cudaFree(circle_main_diagonals_); + circle_main_diagonals_ = nullptr; + } + if (circle_upper_diagonals_) { + cudaFree(circle_upper_diagonals_); + circle_upper_diagonals_ = nullptr; + } + /* Cuda does not supply a cyclic tridiagonal solver. */ + /* Thus we use the Sherman–Morrison formula to reduce the problem to a simple tridiagonal problem with two right hand sides. */ + if (sherman_morrison_gammas_) { + cudaFree(sherman_morrison_gammas_); + sherman_morrison_gammas_ = nullptr; + } + if (factor_) { + cudaFree(factor_); + factor_ = nullptr; + } + + /* Tridiagonal Radial Matrices */ + if (radial_lower_diagonals_) { + cudaFree(radial_lower_diagonals_); + radial_lower_diagonals_ = nullptr; + } + if (radial_main_diagonals_) { + cudaFree(radial_main_diagonals_); + radial_main_diagonals_ = nullptr; + } + if (radial_upper_diagonals_) { + cudaFree(radial_upper_diagonals_); + radial_upper_diagonals_ = nullptr; + } + + /* Tridiaginal Cuda Solver */ + cusparseDestroy(sparse_handle_); + + /* Free Tridiagonal Solver Buffer. */ + if (pBuffer_) { + cudaFree(pBuffer_); + pBuffer_ = nullptr; + } + + /* Inner Boundary Mumps COO Matrix */ + if (d_inner_boundary_matrix_row_indices_) { + cudaFree(d_inner_boundary_matrix_row_indices_); + d_inner_boundary_matrix_row_indices_ = nullptr; + } + if (d_inner_boundary_matrix_column_indices_) { + cudaFree(d_inner_boundary_matrix_column_indices_); + d_inner_boundary_matrix_column_indices_ = nullptr; + } + if (d_inner_boundary_matrix_values_) { + cudaFree(d_inner_boundary_matrix_values_); + d_inner_boundary_matrix_values_ = nullptr; + } + + finalizeMumpsSolver(); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1.1_initializeMumps.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1.1_initializeMumps.cu new file mode 100644 index 00000000..f4d38a4d --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1.1_initializeMumps.cu @@ -0,0 +1,90 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +void ExtrapolatedSmootherTakeGPU::initializeMumps(){ + inner_boundary_mumps_solver_.job = JOB_INIT; + inner_boundary_mumps_solver_.par = PAR_PARALLEL; + /* The matrix is positive definite for invertible mappings. */ + /* Therefore we use SYM_POSITIVE_DEFINITE instead of SYM_GENERAL_SYMMETRIC. */ + inner_boundary_mumps_solver_.sym = SYM_UNSYMMETRIC; + inner_boundary_mumps_solver_.comm_fortran = USE_COMM_WORLD; + dmumps_c(&inner_boundary_mumps_solver_); + + inner_boundary_mumps_solver_.ICNTL(1) = 0; // Output stream for error messages. + inner_boundary_mumps_solver_.ICNTL(2) = 0; // Output stream for diagnostic printing and statistics local to each MPI process. + inner_boundary_mumps_solver_.ICNTL(3) = 0; // Output stream for global information, collected on the host + inner_boundary_mumps_solver_.ICNTL(4) = 0; // Level of printing for error, warning, and diagnostic messages. + inner_boundary_mumps_solver_.ICNTL(5) = 0; // Controls the matrix input format + inner_boundary_mumps_solver_.ICNTL(6) = 7; // Permutes the matrix to a zero-free diagonal and/or scale the matrix + inner_boundary_mumps_solver_.ICNTL(7) = + 5; // Computes a symmetric permutation (ordering) to determine the pivot order to be used for the + // factorization in case of sequential analysis + inner_boundary_mumps_solver_.ICNTL(8) = 77; // Describes the scaling strategy + inner_boundary_mumps_solver_.ICNTL(9) = 1; // Computes the solution using A or A^T + inner_boundary_mumps_solver_.ICNTL(10) = 0; // Applies the iterative refinement to the computed solution + inner_boundary_mumps_solver_.ICNTL(11) = 0; // Computes statistics related to an error analysis of the linear system solved + inner_boundary_mumps_solver_.ICNTL(12) = 0; // Defines an ordering strategy for symmetric matrices and is used + inner_boundary_mumps_solver_.ICNTL(13) = 0; // Controls the parallelism of the root node + inner_boundary_mumps_solver_.ICNTL(14) = 20;// Controls the percentage increase in the estimated working space + inner_boundary_mumps_solver_.ICNTL(15) = 0; // Exploits compression of the input matrix resulting from a block format + inner_boundary_mumps_solver_.ICNTL(16) = 0; // Controls the setting of the number of OpenMP threads + // ICNTL(17) Doesn't exist + inner_boundary_mumps_solver_.ICNTL(18) = 0; // Defines the strategy for the distributed input matrix + inner_boundary_mumps_solver_.ICNTL(19) = 0; // Computes the Schur complement matrix + inner_boundary_mumps_solver_.ICNTL(20) = 0; // Determines the format (dense, sparse, or distributed) of the right-hand sides + inner_boundary_mumps_solver_.ICNTL(21) = 0; // Determines the distribution (centralized or distributed) of the solution vectors. + inner_boundary_mumps_solver_.ICNTL(22) = 0; // Controls the in-core/out-of-core (OOC) factorization and solve. + inner_boundary_mumps_solver_.ICNTL(23) = 0; // Corresponds to the maximum size of the working memory in MegaBytes that MUMPS can + // allocate per working process + inner_boundary_mumps_solver_.ICNTL(24) = 0; // Controls the detection of “null pivot rows”. + inner_boundary_mumps_solver_.ICNTL(25) = + 0; // Allows the computation of a solution of a deficient matrix and also of a null space basis + inner_boundary_mumps_solver_.ICNTL(26) = 0; // Drives the solution phase if a Schur complement matrix has been computed + inner_boundary_mumps_solver_.ICNTL(27) = -32; // Controls the blocking size for multiple right-hand sides. + inner_boundary_mumps_solver_.ICNTL(28) = 0; // Determines whether a sequential or parallel computation of the ordering is performed + inner_boundary_mumps_solver_.ICNTL(29) = + 0; // Defines the parallel ordering tool (when ICNTL(28)=1) to be used to compute the fill-in reducing permutation. + inner_boundary_mumps_solver_.ICNTL(30) = 0; // Computes a user-specified set of entries in the inverse A^−1 of the original matrix + inner_boundary_mumps_solver_.ICNTL(31) = 0; // Indicates which factors may be discarded during the factorization. + inner_boundary_mumps_solver_.ICNTL(32) = 0; // Performs the forward elimination of the right-hand sides during the factorization + inner_boundary_mumps_solver_.ICNTL(33) = 0; // Computes the determinant of the input matrix. + inner_boundary_mumps_solver_.ICNTL(34) = 0; // Controls the conservation of the OOC files during JOB= –3 + inner_boundary_mumps_solver_.ICNTL(35) = 0; // Controls the activation of the BLR feature + inner_boundary_mumps_solver_.ICNTL(36) = 0; // Controls the choice of BLR factorization variant + inner_boundary_mumps_solver_.ICNTL(37) = 0; // Controls the BLR compression of the contribution blocks + inner_boundary_mumps_solver_.ICNTL(38) = 600; // Estimates compression rate of LU factors + inner_boundary_mumps_solver_.ICNTL(39) = 500; // Estimates compression rate of contribution blocks + // ICNTL(40-47) Don't exist + inner_boundary_mumps_solver_.ICNTL(48) = 1; // Multithreading with tree parallelism + inner_boundary_mumps_solver_.ICNTL(49) = 0; // Compact workarray id%S at the end of factorization phase + // ICNTL(50-55) Don't exist + inner_boundary_mumps_solver_.ICNTL(56) = + 0; // Detects pseudo-singularities during factorization and factorizes the root node with a rankrevealing method + // ICNTL(57) Doesn't exist + inner_boundary_mumps_solver_.ICNTL(58) = 2; // Defines options for symbolic factorization + // ICNTL(59-60) Don't exist + + inner_boundary_mumps_solver_.CNTL(1) = -1.0; // Relative threshold for numerical pivoting + inner_boundary_mumps_solver_.CNTL(2) = -1.0; // Stopping criterion for iterative refinement + inner_boundary_mumps_solver_.CNTL(3) = 0.0; // Determine null pivot rows + inner_boundary_mumps_solver_.CNTL(4) = -1.0; // Determines the threshold for static pivoting + inner_boundary_mumps_solver_.CNTL(5) = + 0.0; // Defines the fixation for null pivots and is effective only when null pivot row detection is active + // CNTL(6) Doesn't exist + inner_boundary_mumps_solver_.CNTL(7) = 0.0; // Defines the precision of the dropping parameter used during BLR compression + // CNTL(8-15) Don't exist + + inner_boundary_mumps_solver_.job = JOB_ANALYSIS_AND_FACTORIZATION; + inner_boundary_mumps_solver_.n = level_.grid().ntheta(); + inner_boundary_mumps_solver_.nz = inner_boundary_matrix_nnz_; + inner_boundary_mumps_solver_.irn = inner_boundary_matrix_row_indices_.get(); + inner_boundary_mumps_solver_.jcn = inner_boundary_matrix_column_indices_.get(); + inner_boundary_mumps_solver_.a = inner_boundary_matrix_values_.get(); + + dmumps_c(&inner_boundary_mumps_solver_); +} + +void ExtrapolatedSmootherTakeGPU::finalizeMumpsSolver() +{ + inner_boundary_mumps_solver_.job = JOB_END; + dmumps_c(&inner_boundary_mumps_solver_); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1_buildAscMatrices.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1_buildAscMatrices.cu new file mode 100644 index 00000000..b0d447ff --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/1_buildAscMatrices.cu @@ -0,0 +1,625 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +__global__ void build_AscMatrices_kernel( + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* radial_lower_diagonals, double* radial_main_diagonals, double* radial_upper_diagonals, + int* d_inner_boundary_matrix_row_indices, + int* d_inner_boundary_matrix_column_indices, + double* d_inner_boundary_matrix_values, + PolarGrid* grid, bool DirBC_Interior, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = DirBC_Interior ? 0 : -1; + const int max_i_r = grid->nr() - 1; + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + + /* Local (shared memory) thread indices. */ + const int s_i_r = threadIdx.x; + const int s_i_theta = threadIdx.y; + + /* Compute Jacobian on current node */ + const double r = grid->radius(i_r); + const double theta = grid->theta(i_theta); + + const double sin_theta = sin_theta_cache[i_theta]; + const double cos_theta = cos_theta_cache[i_theta]; + + const double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + const double coeff_alpha = coeff_alpha_cache[i_r]; + + const double detDF = Jrr * Jtt - Jrt * Jtr; + const double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + const double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + + __syncthreads(); + + /* Node lies outside of the grid. */ + if (global_i_r < 0 || global_i_r >= grid->nr() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if (s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Compute neighbor distances */ + bool isOnInnerBoundary = (i_r == 0); + bool isOnOuterBoundary = (i_r == grid->nr() - 1); + + double h1 = DirBC_Interior ? + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 0.0) : + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 2.0 * grid->radius(0)); + double h2 = (!isOnOuterBoundary) ? grid->radialSpacing(i_r) : 0.0; + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + double coeff1 = (h1 != 0.0) ? 0.5 * (k1 + k2) / h1 : 0.0; + double coeff2 = (h2 != 0.0) ? 0.5 * (k1 + k2) / h2 : 0.0; + double coeff3 = (k1 != 0.0) ? 0.5 * (h1 + h2) / k1 : 0.0; + double coeff4 = (k2 != 0.0) ? 0.5 * (h1 + h2) / k2 : 0.0; + + int i_theta_M1 = grid->wrapThetaIndex(i_theta - 1); + int i_theta_P1 = grid->wrapThetaIndex(i_theta + 1); + + const int numberSmootherCircles = grid->numberSmootherCircles(); + const int lengthSmootherRadial = grid->lengthSmootherRadial(); + + int row, column; + double value; + + int circle_m = grid->ntheta(); + int radial_m = grid->lengthSmootherRadial(); + + /* ------------------------------------------ */ + /* Circle Section: Node in the inner boundary */ + /* ------------------------------------------ */ + if(i_r == 0){ + if(DirBC_Interior){ + /* ------------------------------------------------ */ + /* Case 1: Dirichlet boundary on the inner boundary */ + /* ------------------------------------------------ */ + d_inner_boundary_matrix_row_indices[i_theta] = i_theta + 1; + d_inner_boundary_matrix_column_indices[i_theta] = i_theta + 1; + d_inner_boundary_matrix_values[i_theta] = 1.0; + } + else{ + /* ------------------------------------------------------------- */ + /* Case 2: Across origin discretization on the interior boundary */ + /* ------------------------------------------------------------- */ + /* h1 gets replaced with 2 * R0. */ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ + + int i_theta_AcrossOrigin = grid->wrapThetaIndex(i_theta + grid->ntheta() / 2); + + const int center_index = i_theta; + const int left_index = i_theta_AcrossOrigin; + + int center_nz_index; + if (!DirBC_Interior) { + if (i_theta % 2 == 0) { + center_nz_index = 3 * (i_theta / 2); + } + else { + center_nz_index = 3 * (i_theta / 2) + 1; + } + } + else { + center_nz_index = i_theta; + } + + + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* -| X | O | X | */ + /* -| | | | */ + /* -| Õ | O | O | */ + /* -| | | | */ + /* -| X | O | X | */ + + /* Stencil Indexing */ + int StencilType_Center = 0; + int StencilType_Left = 1; + + double center_value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Center] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Center] = center_index+ 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Center] = center_value; + + double left_value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Left] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Left] = left_index + 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Left] = left_value; + } + else { + /* i_theta % 2 == 0 */ + /* -| O | O | O | */ + /* -| | | | */ + /* -| X̃ | O | X | */ + /* -| | | | */ + /* -| O | O | O | */ + int StencilType_Center = 0; + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Center] = i_theta + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Center] = i_theta + 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Center] = 1.0; + } + } + } + /* ------------------------------------------ */ + /* Node in the interior of the Circle Section */ + /* ------------------------------------------ */ + else if(i_r > 0 && i_r < numberSmootherCircles){ + int center_index = i_theta; + int bottom_index = i_theta_M1; + int top_index = i_theta_P1; + /* -------------------------- */ + /* Cyclic Tridiagonal Section */ + /* i_r % 2 == 1 */ + if (i_r & 1) { + /* i_theta % 2 == 1 */ /* i_theta % 2 == 0 */ + /* | X | O | X | */ /* | O | O | O | */ + /* | | | | */ /* | | | | */ + /* | 0 | Õ | O | */ /* | X | Õ | X | */ + /* | | | | */ /* | | | | */ + /* | X | O | X | */ /* | O | O | O | */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + + /* Bottom */ + row = center_index; + column = bottom_index; + value = - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + + /* Top */ + row = center_index; + column = top_index; + value = - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + } + + /* ---------------- */ + /* Diagonal Section */ + /* i_r % 2 == 0 */ + else { + /* i_theta % 2 == 1 */ /* i_theta % 2 == 0 */ + /* | O | X | O | */ /* | O | O | O | */ + /* | | | | */ /* | | | | */ + /* | O | Õ | O | */ /* | O | X̃ | O | */ + /* | | | | */ /* | | | | */ + /* | O | X | O | */ /* | O | O | O | */ + + if (i_theta & 1) { /* i_theta % 2 == 1 */ + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + circle_main_diagonals[i_r * circle_m + row] = value; + } + else { /* i_theta % 2 == 0 */ + /* Center: Coarse */ + row = center_index; + column = center_index; + value = 1.0; + circle_main_diagonals[i_r * circle_m + row] = value; + } + } + } + /* --------------------------------------------- */ + /* Radial Section: Node next to circular section */ + /* --------------------------------------------- */ + else if(i_r == numberSmootherCircles){ + int center_index = i_r - numberSmootherCircles; + int right_index = i_r - numberSmootherCircles + 1; + if (i_theta & 1) { + /* i_theta % 2 == 1 and i_r % 2 == 1 */ + /* | X | O | X || O X O X */ + /* | | | || -------------- */ + /* | 0 | O | O || Õ O O O */ + /* | | | || -------------- */ + /* | X | O | X || O X O X */ + /* or */ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ + /* | O | X | O || X O X O */ + /* | | | || -------------- */ + /* | 0 | O | O || Õ O O O */ + /* | | | || -------------- */ + /* | O | X | O || X O X O */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r + 1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + else { + if (i_r & 1) { + /* i_theta % 2 == 0 and i_r % 2 == 1 */ + /* | O | O | O || O O O O */ + /* | | | || -------------- */ + /* | X | O | X || Õ X O X */ + /* | | | || -------------- */ + /* | O | O | O || O O O O */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + radial_main_diagonals[i_theta * radial_m + row] = value; + } + else { + /* i_theta % 2 == 0 and i_r % 2 == 0 */ + /* | O | O | O || O O O O */ + /* | | | || -------------- */ + /* | O | X | O || X̃ O X O */ + /* | | | || -------------- */ + /* | O | O | O || O O O O */ + /* Center: Coarse */ + row = center_index; + column = center_index; + value = 1.0; + radial_main_diagonals[i_theta * radial_m + row] = value; + } + } + } + /* ------------------------------------------ */ + /* Node in the interior of the Radial Section */ + /* ------------------------------------------ */ + else if(i_r > numberSmootherCircles && i_r < grid->nr()-2){ + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + int right_index = i_r - numberSmootherCircles + 1; + + /* ------------------- */ + /* Tridiagonal Section */ + /* i_theta % 2 == 1 */ + if (i_theta & 1) { + /* i_r % 2 == 1 */ /* i_r % 2 == 0 */ + /* ---------- */ /* ---------- */ + /* X O X */ /* O X O */ + /* ---------- */ /* ---------- */ + /* O Õ O */ /* O Õ O */ + /* ---------- */ /* ---------- */ + /* X O X */ /* O X O */ + /* ---------- */ /* ---------- */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Left */ + row = center_index; + column = left_index; + value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + } + /* ---------------- */ + /* Diagonal Section */ + /* i_theta % 2 == 0 */ + else { + /* i_r % 2 == 1 */ /* i_r % 2 == 0 */ + /* ---------- */ /* ---------- */ + /* O O O */ /* O O O */ + /* ---------- */ /* ---------- */ + /* X Õ X */ /* O X̃ O */ + /* ---------- */ /* ---------- */ + /* O O O */ /* O O O */ + /* ---------- */ /* ---------- */ + if (i_r & 1) { /* i_r % 2 == 1 */ + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + radial_main_diagonals[i_theta * radial_m + row] = value; + } + else { /* i_r % 2 == 0 */ + /* Center: Coarse */ + row = center_index; + column = center_index; + value = 1.0; + radial_main_diagonals[i_theta * radial_m + row] = value; + } + } + } + /* ------------------------------------------- */ + /* Radial Section: Node next to outer boundary */ + /* ------------------------------------------- */ + else if(i_r == grid->nr()-2){ + assert(i_r % 2 == 1); + + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + int right_index = i_r - numberSmootherCircles + 1; + + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* ---------------|| */ + /* O X O X || */ + /* ---------------|| */ + /* O O Õ O || */ + /* ---------------|| */ + /* O X O X || */ + /* ---------------|| */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Left */ + row = center_index; + column = left_index; + value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = 0.0; /* Make tridiagonal matrix symmetric */ + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + else { + /* i_theta % 2 == 0 */ + /* ---------------|| */ + /* O O O O || */ + /* ---------------|| */ + /* O X Õ X || */ + /* ---------------|| */ + /* O O O O || */ + /* ---------------|| */ + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + radial_main_diagonals[i_theta * radial_m + row] = value; + } + } + /* ------------------------------------------ */ + /* Radial Section: Node on the outer boundary */ + /* ------------------------------------------ */ + else if(i_r == grid->nr()-1){ + assert(!i_r % 2 == 0); + + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* -----------|| */ + /* X O X || */ + /* -----------|| */ + /* O O Õ || */ + /* -----------|| */ + /* X O X || */ + /* -----------|| */ + row = center_index; + column = center_index; + value = 1.0; + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + row = center_index; + column = left_index; + value = 0.0; /* Make tridiagonal matrix symmetric */ + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + else { + /* i_theta % 2 == 0 */ + /* -----------|| */ + /* O O O || */ + /* -----------|| */ + /* X O X̃ || */ + /* -----------|| */ + /* O O O || */ + /* -----------|| */ + row = center_index; + column = center_index; + value = 1.0; + radial_main_diagonals[i_theta * radial_m + row] = value; + } + } +} + + + +void ExtrapolatedSmootherTakeGPU::buildAscMatrices() +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, &domain_geometry_, sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + /* We use precomputed DensityProfileCoefficients values. */ + // DensityProfileCoefficients* device_density_profile; + // cudaMalloc(&device_density_profile, sizeof(DensityProfileCoefficients)); + // cudaMemcpy(device_density_profile, &density_profile_coefficients_, sizeof(DensityProfileCoefficients), cudaMemcpyHostToDevice); + + /* The stencil is computed on a 14x14 grid. */ + /* We use a 16x16 halo block to compute the expensive values. */ + /* This minimizes threads beeing idle. */ + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + build_AscMatrices_kernel<<>>( + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + radial_lower_diagonals_, radial_main_diagonals_, radial_upper_diagonals_, + d_inner_boundary_matrix_row_indices_, + d_inner_boundary_matrix_column_indices_, + d_inner_boundary_matrix_values_, + level_.device_grid(), DirBC_Interior_, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); + + int nnz = DirBC_Interior_ ? grid.ntheta() : grid.ntheta() / 2 + 2 * (grid.ntheta() / 2); + cudaMemcpy(inner_boundary_matrix_row_indices_.get(), d_inner_boundary_matrix_row_indices_, nnz * sizeof(int), cudaMemcpyDeviceToHost); + cudaMemcpy(inner_boundary_matrix_column_indices_.get(), d_inner_boundary_matrix_column_indices_, nnz * sizeof(int), cudaMemcpyDeviceToHost); + cudaMemcpy(inner_boundary_matrix_values_.get(), d_inner_boundary_matrix_values_, nnz * sizeof(double), cudaMemcpyDeviceToHost); + + /* We use precomputed DensityProfileCoefficients values. */ + cudaFree(device_domain_geometry); + // cudaFree(device_density_profile); +} diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu new file mode 100644 index 00000000..fab0c0de --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu @@ -0,0 +1,41 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +__global__ void extrapolated_adjustAscCircle_ShermanMorrison_kernel( + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, + PolarGrid* grid) +{ + int i_r = 1 + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + if(i_r < 0 || i_r >= grid->numberSmootherCircles()) return; + + int circle_m = grid->ntheta(); + + if(i_r > 0 && i_r < grid->numberSmootherCircles()) + { + /* gamma_ = -main_diagonal(0); */ + double gamma = -circle_main_diagonals[i_r * circle_m + 0]; + /* main_diagonal(0) -= gamma_; */ + circle_main_diagonals[i_r * circle_m + 0] -= gamma; + /* main_diagonal(matrix_dimension_ - 1) -= cyclic_corner_element() * cyclic_corner_element() / gamma_; */ + double alpha = circle_lower_diagonals[i_r * circle_m + 0]; + double beta = circle_upper_diagonals[i_r * circle_m + circle_m-1]; + circle_main_diagonals[i_r * circle_m + circle_m-1] -= alpha * beta / gamma; + /* We will need gamma later again. */ + sherman_morrison_gammas[i_r] = gamma; + } +} + +void ExtrapolatedSmootherTakeGPU::adjustAscCircle_ShermanMorrison() +{ + const PolarGrid& grid = level_.grid(); + + int blockSize = 256; + int numBlocks = (grid.numberSmootherCircles()/2 + blockSize - 1) / blockSize; + + extrapolated_adjustAscCircle_ShermanMorrison_kernel<<>>( + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid() + ); + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/3_smoothingInPlace.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/3_smoothingInPlace.cu new file mode 100644 index 00000000..0aa648e2 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/3_smoothingInPlace.cu @@ -0,0 +1,35 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +void ExtrapolatedSmootherTakeGPU::extrapolatedSmoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + assert(x.size() == grid.numberOfNodes()); + assert(rhs.size() == grid.numberOfNodes()); + assert(temp.size() == grid.numberOfNodes()); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, &domain_geometry_, sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + /* We use precomputed DensityProfileCoefficients values. */ + // DensityProfileCoefficients* device_density_profile; + // cudaMalloc(&device_density_profile, sizeof(DensityProfileCoefficients)); + // cudaMemcpy(device_density_profile, &density_profile_coefficients_, sizeof(DensityProfileCoefficients), cudaMemcpyHostToDevice); + + applyAscOrtho_BlackCircle(x, rhs, temp, device_domain_geometry); + solveAsc_BlackCircle(x, rhs, temp); + + applyAscOrtho_WhiteCircle(x, rhs, temp, device_domain_geometry); + solveAsc_WhiteCircle(x, rhs, temp); + + applyAscOrtho_BlackRadial(x, rhs, device_domain_geometry); + solveAsc_BlackRadial(x, rhs); + + applyAscOrtho_WhiteRadial(x, rhs, device_domain_geometry); + solveAsc_WhiteRadial(x, rhs); + + /* We use precomputed DensityProfileCoefficients values. */ + cudaFree(device_domain_geometry); + // cudaFree(device_density_profile); +} \ No newline at end of file diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/4_applyAscOrtho_Circle.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/4_applyAscOrtho_Circle.cu new file mode 100644 index 00000000..4af8dd5c --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/4_applyAscOrtho_Circle.cu @@ -0,0 +1,280 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +__global__ void extrapolated_applyAscOrtho_Circle_kernel( + double* x, double* rhs, double* temp, + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, + PolarGrid* grid, bool DirBC_Interior, + int start_i_r, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = DirBC_Interior ? 0 : -1; + const int max_i_r = grid->numberSmootherCircles(); + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + __shared__ double s_art[16][16 + 1]; + __shared__ double s_x[16][16 + 1]; + + /* Indexing into shared data */ + int s_i_r = threadIdx.x; + int s_i_theta = threadIdx.y; + + /* Current node index */ + int center_index = grid->index(i_r, i_theta); + s_x[s_i_r][s_i_theta] = x[center_index]; + + /* Compute Jacobian on current node */ + double r = grid->radius(i_r); + double theta = grid->theta(i_theta); + + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + double coeff_alpha = coeff_alpha_cache[i_r]; + + double detDF = Jrr * Jtt - Jrt * Jtr; + double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + double art = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + s_art[s_i_r][s_i_theta] = art; + + __syncthreads(); + + /* Node lies outside of the circle section. */ + if(global_i_r < 0 || global_i_r >= grid->numberSmootherCircles() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if(s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Node color and smoother color doesnt match. */ + if(i_r % 2 != start_i_r) return; + + /* Prepare temp for the 2nd solution in the Shermann-Morrison formula. */ + if(i_r > 0){ + if(i_r & 1){ + int matrix_index = i_r * grid->ntheta(); + if(i_theta == 0){ + temp[matrix_index + i_theta] = sherman_morrison_gammas[i_r]; + } + else if(i_theta > 0 && i_theta < grid->ntheta()-1){ + temp[matrix_index + i_theta] = 0.0; + } + else if(i_theta == grid->ntheta()-1){ + temp[matrix_index + i_theta] = circle_upper_diagonals[matrix_index + grid->ntheta() - 1]; + } + } + } + + /* Compute neighbor distances */ + bool isOnInnerBoundary = (i_r == 0); + + double h1 = DirBC_Interior ? + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 0.0) : + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 2.0 * grid->radius(0)); + double h2 = grid->radialSpacing(i_r); + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + double coeff1 = (h1 != 0.0) ? 0.5 * (k1 + k2) / h1 : 0.0; + double coeff2 = (h2 != 0.0) ? 0.5 * (k1 + k2) / h2 : 0.0; + double coeff3 = (k1 != 0.0) ? 0.5 * (h1 + h2) / k1 : 0.0; + double coeff4 = (k2 != 0.0) ? 0.5 * (h1 + h2) / k2 : 0.0; + + if (!isOnInnerBoundary) { + if (i_r & 1) { + /* i_r % 2 == 1 and i_theta % 2 == 1 */ + /* | X | O | X | */ + /* | | | | */ + /* | O | Õ | O | */ + /* | | | | */ + /* | X | O | X | */ + /* or */ + /* i_r % 2 == 1 and i_theta % 2 == 0 */ + /* | O | O | O | */ + /* | | | | */ + /* | X | Õ | X | */ + /* | | | | */ + /* | O | O | O | */ + x[center_index] = rhs[center_index] - ( + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + if (i_theta & 1) { + /* i_r % 2 == 0 and i_theta % 2 == 1 */ + /* | O | X | O | */ + /* | | | | */ + /* | O | Õ | O | */ + /* | | | | */ + /* | O | X | O | */ + x[center_index] = rhs[center_index] - ( + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + /* i_r % 2 == 0 and i_theta % 2 == 0 */ + /* | O | O | O | */ + /* | | | | */ + /* | O | X̃ | O | */ + /* | | | | */ + /* | O | O | O | */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } + } + else if(isOnInnerBoundary && !DirBC_Interior){ + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* -| X | O | X | */ + /* -| | | | */ + /* -| Õ | O | O | */ + /* -| | | | */ + /* -| X | O | X | */ + x[center_index] = rhs[center_index] - ( + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else{ + /* i_theta % 2 == 0 */ + /* -| O | O | O | */ + /* -| | | | */ + /* -| X̃ | O | X | */ + /* -| | | | */ + /* -| O | O | O | */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } + else if(isOnInnerBoundary && DirBC_Interior){ + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* || X | O | X | */ + /* || | | | */ + /* || Õ | O | O | */ + /* || | | | */ + /* || X | O | X | */ + x[center_index] = rhs[center_index]; + } + else { + /* i_theta % 2 == 0 */ + /* || O | O | O | */ + /* || | | | */ + /* || X̃ | O | X | */ + /* || | | | */ + /* || O | O | O | */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } +} + + + +void ExtrapolatedSmootherTakeGPU::applyAscOrtho_BlackCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry) +{ + + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.numberSmootherCircles() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + extrapolated_applyAscOrtho_Circle_kernel<<>>( + x.data(), rhs.data(), temp.data(), + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid(), DirBC_Interior_, + start_black_circles, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} + + + +void ExtrapolatedSmootherTakeGPU::applyAscOrtho_WhiteCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.numberSmootherCircles() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + extrapolated_applyAscOrtho_Circle_kernel<<>>( + x.data(), rhs.data(), temp.data(), + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid(), DirBC_Interior_, + start_white_circles, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/5_applyAscOrtho_Radial.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/5_applyAscOrtho_Radial.cu new file mode 100644 index 00000000..6a9e292b --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/5_applyAscOrtho_Radial.cu @@ -0,0 +1,349 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +__global__ void extrapolated_applyAscOrtho_Radial_kernel( + double* x, double* rhs, + PolarGrid* grid, bool DirBC_Interior, + int start_i_theta, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = grid->numberSmootherCircles() + blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = grid->numberSmootherCircles() - 1; + const int max_i_r = grid->nr() - 1; + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + __shared__ double s_art[16][16 + 1]; + __shared__ double s_x[16][16 + 1]; + + /* Indexing into shared data */ + int s_i_r = threadIdx.x; + int s_i_theta = threadIdx.y; + + /* Current node index */ + int center_index = grid->index(i_r, i_theta); + s_x[s_i_r][s_i_theta] = x[center_index]; + + /* Compute Jacobian on current node */ + double r = grid->radius(i_r); + double theta = grid->theta(i_theta); + + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + double coeff_alpha = coeff_alpha_cache[i_r]; + + double detDF = Jrr * Jtt - Jrt * Jtr; + double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + double art = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + s_art[s_i_r][s_i_theta] = art; + + __syncthreads(); + + /* Node lies outside of the radial section. */ + if (global_i_r < grid->numberSmootherCircles() || global_i_r >= grid->nr() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if(s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Node color and smoother color doesnt match. */ + if(i_theta % 2 != start_i_theta) return; + + bool isOnOuterBoundary = (i_r == grid->nr()-1); + bool isNextToCircleSection = (i_r == grid->numberSmootherCircles()); + + double h1 = grid->radialSpacing(i_r-1); + double h2 = ((!isOnOuterBoundary) ? grid->radialSpacing(i_r) : 0.0); + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + double coeff1 = (h1 != 0.0) ? 0.5 * (k1 + k2) / h1 : 0.0; + double coeff2 = (h2 != 0.0) ? 0.5 * (k1 + k2) / h2 : 0.0; + double coeff3 = (k1 != 0.0) ? 0.5 * (h1 + h2) / k1 : 0.0; + double coeff4 = (k2 != 0.0) ? 0.5 * (h1 + h2) / k2 : 0.0; + + /* -------------------- */ + /* Node in the interior */ + /* -------------------- */ + if (i_r > grid->numberSmootherCircles() && i_r < grid->nr() - 2) { + if (i_theta & 1) { + /* i_theta % 2 == 1 and i_r % 2 == 1 */ + /* ---------- */ + /* X O X */ + /* ---------- */ + /* O Õ O */ + /* ---------- */ + /* X O X */ + /* ---------- */ + /* or */ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ + /* ---------- */ + /* O X O */ + /* ---------- */ + /* O Õ O */ + /* ---------- */ + /* O X O */ + /* ---------- */ + x[center_index] = rhs[center_index] - ( + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + if (i_r & 1) { + /* i_theta % 2 == 0 and i_r % 2 == 1 */ + /* ---------- */ + /* O O O */ + /* ---------- */ + /* X Õ X */ + /* ---------- */ + /* O O O */ + /* ---------- */ + x[center_index] = rhs[center_index] - ( + -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + /* i_theta % 2 == 0 and i_r % 2 == 0 */ + /* ---------- */ + /* O O O */ + /* ---------- */ + /* O X̃ O */ + /* ---------- */ + /* O O O */ + /* ---------- */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } + } + else if (i_r == grid->numberSmootherCircles()) { + if (i_theta & 1) { + /* i_theta % 2 == 1 and i_r % 2 == 1 */ + /* | X | O | X || O X O X */ + /* | | | || -------------- */ + /* | 0 | O | O || Õ O O O */ + /* | | | || -------------- */ + /* | X | O | X || O X O X */ + /* or */ + /* i_theta % 2 == 1 and i_r % 2 == 0 */ + /* | O | X | O || X O X O */ + /* | | | || -------------- */ + /* | 0 | O | O || Õ O O O */ + /* | | | || -------------- */ + /* | O | X | O || X O X O */ + x[center_index] = rhs[center_index] - ( + -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + if (i_r & 1) { + /* i_theta % 2 == 0 and i_r % 2 == 1 */ + /* | O | O | O || O O O O */ + /* | | | || -------------- */ + /* | X | O | X || Õ X O X */ + /* | | | || -------------- */ + /* | O | O | O || O O O O */ + x[center_index] = rhs[center_index] - ( + -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + /* i_theta % 2 == 0 and i_r % 2 == 0 */ + /* | O | O | O || O O O O */ + /* | | | || -------------- */ + /* | O | X | O || X̃ O X O */ + /* | | | || -------------- */ + /* | O | O | O || O O O O */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } + } + else if (i_r == grid->nr() - 2) { + assert(i_r & 1); + + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* ---------------|| */ + /* O X O X || */ + /* ---------------|| */ + /* O O Õ O || */ + /* ---------------|| */ + /* O X O X || */ + /* ---------------|| */ + /* "Right" is part of the radial Asc smoother matrices, */ + /* but is shifted over to the rhs to make the radial Asc smoother matrices symmetric. */ + /* Note that the circle Asc smoother matrices are symmetric by default. */ + x[center_index] = rhs[center_index] - ( + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * rhs[grid->index(i_r+1, i_theta)] /* Right: Symmetry shift! */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else { + /* ---------------|| */ + /* O O O O || */ + /* ---------------|| */ + /* O X Õ X || */ + /* ---------------|| */ + /* O O O O || */ + /* ---------------|| */ + x[center_index] = rhs[center_index] - ( + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + } + else if (i_r == grid->nr() - 1) { + assert(!(i_r & 1)); + + if (i_theta & 1) { + /* i_theta % 2 == 1 */ + /* -----------|| */ + /* X O X || */ + /* -----------|| */ + /* O O Õ || */ + /* -----------|| */ + /* X O X || */ + /* -----------|| */ + x[center_index] = rhs[center_index]; + } + else { + /* -----------|| */ + /* O O O || */ + /* -----------|| */ + /* X O X̃ || */ + /* -----------|| */ + /* O O O || */ + /* -----------|| */ + x[center_index] = s_x[s_i_r][s_i_theta]; + } + } +} + + + +void ExtrapolatedSmootherTakeGPU::applyAscOrtho_BlackRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_black_radials = 0; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.lengthSmootherRadial() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + extrapolated_applyAscOrtho_Radial_kernel<<>>( + x.data(), rhs.data(), + level_.device_grid(), DirBC_Interior_, + start_black_radials, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} + + + +void ExtrapolatedSmootherTakeGPU::applyAscOrtho_WhiteRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_white_radials = 1; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.lengthSmootherRadial() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + extrapolated_applyAscOrtho_Radial_kernel<<>>( + x.data(), rhs.data(), + level_.device_grid(), DirBC_Interior_, + start_white_radials, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/6_solveAsc_Circle.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/6_solveAsc_Circle.cu new file mode 100644 index 00000000..89f5bd71 --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/6_solveAsc_Circle.cu @@ -0,0 +1,149 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + + +__global__ void solve_circle_diagonals_kernel( + double* x, PolarGrid* grid, double* circle_main_diagonals) +{ + int i_r = 2 + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= 2 && i_r < grid->numberSmootherCircles() && i_theta < grid->ntheta()) { + x[grid->index(i_r, i_theta)] /= circle_main_diagonals[i_r * grid->ntheta() + i_theta]; + } +} + +__global__ void extrapolated_computeCircleFactor_kernel( + double* x, double* temp, double* factor, + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, PolarGrid* grid) +{ + int i_r = 1 + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + if(i_r < grid->numberSmootherCircles()){ + int matrix_index = i_r * grid->ntheta(); + double alpha = circle_lower_diagonals[matrix_index + 0]; + double gamma = sherman_morrison_gammas[i_r]; + factor[i_r] = (x[matrix_index + 0] + x[matrix_index + grid->ntheta()-1] * alpha / gamma) / + (1.0 + temp[matrix_index + 0] + temp[matrix_index + grid->ntheta()-1] * alpha / gamma); + } +} + + +__global__ void extrapolated_combineCircleSolutions_kernel( + double* x, double* temp, double* factor, PolarGrid* grid) +{ + int i_r = 1 + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r < grid->numberSmootherCircles() && i_theta < grid->ntheta()) { + int matrix_index = i_r * grid->ntheta(); + x[matrix_index + i_theta] -= factor[i_r] * temp[matrix_index + i_theta]; + } +} + + + +void ExtrapolatedSmootherTakeGPU::solveCircleDiagonals(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + std::vector host_solution(grid.ntheta()); + cudaMemcpy(host_solution.data(), x.data(), grid.ntheta() * sizeof(double), cudaMemcpyDeviceToHost); + + inner_boundary_mumps_solver_.job = JOB_COMPUTE_SOLUTION; + inner_boundary_mumps_solver_.nrhs = 1; // single rhs vector + inner_boundary_mumps_solver_.nz_rhs = grid.ntheta(); // non-zeros in rhs + inner_boundary_mumps_solver_.rhs = host_solution.data(); + inner_boundary_mumps_solver_.lrhs = grid.ntheta(); // leading dimension of rhs + dmumps_c(&inner_boundary_mumps_solver_); + if (inner_boundary_mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the system: " << inner_boundary_mumps_solver_.info[0] << std::endl; + } + cudaMemcpy(x.data(), host_solution.data(), grid.ntheta() * sizeof(double), cudaMemcpyHostToDevice); + + dim3 blockDim(16, 16); + dim3 gridDim(((grid.numberSmootherCircles()-1)/2 + blockDim.x - 1) / blockDim.x, (grid.ntheta() + blockDim.y - 1) / blockDim.y); + solve_circle_diagonals_kernel<<>>( + x.data(), level_.device_grid(), circle_main_diagonals_ + ); + cudaDeviceSynchronize(); + +} + +void ExtrapolatedSmootherTakeGPU::solveCircleTridiagonals(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + int start = grid.ntheta(); + int batch_count = grid.numberSmootherCircles() / 2; + int batch_stride = 2 * grid.ntheta(); + + /* cusparseDgtsv2StridedBatch could run in parallel if we use different pBuffer_. */ + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + x.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + temp.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + int factor_blockSize = 256; + int factor_numBlocks = (batch_count + factor_blockSize - 1) / factor_blockSize; + extrapolated_computeCircleFactor_kernel<<>>( + x.data(), temp.data(), factor_, + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid() + ); + cudaDeviceSynchronize(); + + dim3 blockDim(16, 16); + dim3 gridDim((batch_count + blockDim.x - 1) / blockDim.x, (grid.ntheta() + blockDim.y - 1) / blockDim.y); + extrapolated_combineCircleSolutions_kernel<<>>( + x.data(), temp.data(), factor_, level_.device_grid() + ); + cudaDeviceSynchronize(); +} + + + + + +void ExtrapolatedSmootherTakeGPU::solveAsc_BlackCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0; + if(start_black_circles == 0){ + solveCircleDiagonals(x, rhs, temp); + } + else{ + solveCircleTridiagonals(x, rhs, temp); + } +} + +void ExtrapolatedSmootherTakeGPU::solveAsc_WhiteCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1; + if(start_white_circles == 0){ + solveCircleDiagonals(x, rhs, temp); + } + else{ + solveCircleTridiagonals(x, rhs, temp); + } +} diff --git a/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/7_solveAsc_Radial.cu b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/7_solveAsc_Radial.cu new file mode 100644 index 00000000..7bac7a4a --- /dev/null +++ b/src/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/7_solveAsc_Radial.cu @@ -0,0 +1,48 @@ +#include "../../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + + +__global__ void solve_black_radial_diagonals_kernel( + double* x, PolarGrid* grid, double* radial_main_diagonals) +{ + int i_r = grid->numberSmootherCircles() + (blockIdx.x * blockDim.x + threadIdx.x); + int i_theta = 2 * (blockIdx.y * blockDim.y + threadIdx.y); + + if (grid->numberSmootherCircles() <= i_r && i_r < grid->nr() && i_theta < grid->ntheta()) { + x[grid->index(i_r, i_theta)] /= radial_main_diagonals[i_theta * grid->lengthSmootherRadial() + i_r - grid->numberSmootherCircles()]; + } +} + + + +void ExtrapolatedSmootherTakeGPU::solveAsc_BlackRadial(GPU_Vector& x, const GPU_Vector& rhs) +{ + const PolarGrid& grid = level_.grid(); + + dim3 blockDim(16, 16); + dim3 gridDim((grid.lengthSmootherRadial() + blockDim.x - 1) / blockDim.x, (grid.ntheta()/2 + blockDim.y - 1) / blockDim.y); + solve_black_radial_diagonals_kernel<<>>( + x.data(), level_.device_grid(), + radial_main_diagonals_ + ); + cudaDeviceSynchronize(); +} + + +void ExtrapolatedSmootherTakeGPU::solveAsc_WhiteRadial(GPU_Vector& x, const GPU_Vector& rhs) +{ + const PolarGrid& grid = level_.grid(); + + const int start_white_radial_solver = 1; + int start = start_white_radial_solver * grid.lengthSmootherRadial(); + int batch_count = grid.ntheta() / 2; + int batch_stride = 2 * grid.lengthSmootherRadial(); + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.lengthSmootherRadial(), + radial_lower_diagonals_ + start, + radial_main_diagonals_ + start, + radial_upper_diagonals_ + start, + x.data() + grid.numberCircularSmootherNodes() + start, + batch_count, batch_stride, pBuffer_ + ); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cu b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cu new file mode 100644 index 00000000..9d828fd8 --- /dev/null +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cu @@ -0,0 +1,272 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector& solution, + Vector& rhs, Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.residual(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.error_correction(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_F_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + extrapolatedProlongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, GPU_Vector& solution, + GPU_Vector& rhs, GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_error_correction(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_residual(), 4.0 / 3.0, next_level.GPU_error_correction(), -1.0 / 3.0); + } else { + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_residual(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_error_correction(), 4.0 / 3.0, next_level.GPU_residual(), -1.0 / 3.0); + } else { + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_F_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + multigrid_V_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_F_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + extrapolatedProlongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cu b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cu new file mode 100644 index 00000000..bc48c7a5 --- /dev/null +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cu @@ -0,0 +1,269 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector& solution, + Vector& rhs, Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.residual(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.error_correction(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + extrapolatedProlongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, GPU_Vector& solution, + GPU_Vector& rhs, GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_error_correction(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_residual(), 4.0 / 3.0, next_level.GPU_error_correction(), -1.0 / 3.0); + } else { + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_residual(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_error_correction(), 4.0 / 3.0, next_level.GPU_residual(), -1.0 / 3.0); + } else { + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_V_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + extrapolatedProlongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cu b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cu new file mode 100644 index 00000000..04200b96 --- /dev/null +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cu @@ -0,0 +1,272 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector& solution, + Vector& rhs, Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.residual(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.error_correction(), residual); + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.solution(), solution); + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + extrapolatedProlongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, GPU_Vector& solution, + GPU_Vector& rhs, GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Compute extrapolated residual */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_error_correction(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.error_correction(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_residual(), 4.0 / 3.0, next_level.GPU_error_correction(), -1.0 / 3.0); + } else { + linear_combination(next_level.residual(), 4.0 / 3.0, next_level.error_correction(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Compute extrapolated residual. */ + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + // P_ex^T (f_l - A_l*u_l) + level.computeResidual(residual, rhs, solution); + extrapolatedRestriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + // f_{l-1} - A_{l-1}* Inject(u_l) + injection(level_depth, next_level.GPU_solution(), solution); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_solution(), next_level.solution()); + } + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_residual(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else { + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + } + // res_ex = 4/3 * P_ex^T (f_l - A_l*u_l) - 1/3 * (f_{l-1} - A_{l-1}* Inject(u_l)) + if(next_level.processingType() == ProcessingType::GPU){ + linear_combination(next_level.GPU_error_correction(), 4.0 / 3.0, next_level.GPU_residual(), -1.0 / 3.0); + } else { + linear_combination(next_level.error_correction(), 4.0 / 3.0, next_level.residual(), -1.0 / 3.0); + } + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_W_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + multigrid_W_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + extrapolatedProlongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + if (level_depth == 0 && !full_grid_smoothing_) { + level.extrapolatedSmoothingInPlace(solution, rhs, residual); + } + else { + level.smoothingInPlace(solution, rhs, residual); + } + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cu b/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cu new file mode 100644 index 00000000..5ac3522a --- /dev/null +++ b/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cu @@ -0,0 +1,205 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::multigrid_F_Cycle(const int level_depth, Vector& solution, Vector& rhs, + Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.residual(), residual); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.error_correction(), residual); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_F_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + prolongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::multigrid_F_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, + GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_F_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + multigrid_V_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_F_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + prolongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cu b/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cu new file mode 100644 index 00000000..751c2dfe --- /dev/null +++ b/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cu @@ -0,0 +1,202 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::multigrid_V_Cycle(const int level_depth, Vector& solution, Vector& rhs, + Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.residual(), residual); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.error_correction(), residual); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + prolongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::multigrid_V_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, + GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_V_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_V_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + prolongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cu b/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cu new file mode 100644 index 00000000..f50c7d42 --- /dev/null +++ b/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cu @@ -0,0 +1,205 @@ +#include "../../../include/GMGPolar/gmgpolar.h" + +#include "../../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +void GMGPolar::multigrid_W_Cycle(const int level_depth, Vector& solution, Vector& rhs, + Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() != ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::GPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.residual(), residual); + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.error_correction(), residual); + + /* Step 2: Set starting error to zero. */ + assign(next_level.residual(), 0.0); + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + + /* Interpolate the correction */ + prolongation(level_depth + 1, residual, next_level.residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} + + + +void GMGPolar::multigrid_W_Cycle(const int level_depth, GPU_Vector& solution, GPU_Vector& rhs, + GPU_Vector& residual) +{ + assert(0 <= level_depth && level_depth < number_of_levels_ - 1); + + auto start_MGC = std::chrono::high_resolution_clock::now(); + + Level& level = levels_[level_depth]; + Level& next_level = levels_[level_depth + 1]; + + assert(level.processingType() == ProcessingType::GPU); + assert(next_level.processingType() != ProcessingType::CPU); + + auto start_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------ */ + /* Presmoothing */ + for (int i = 0; i < pre_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_preSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_preSmoothing += std::chrono::duration(end_MGC_preSmoothing - start_MGC_preSmoothing).count(); + + /* ---------------------- */ + /* Coarse grid correction */ + /* ---------------------- */ + + auto start_MGC_residual = std::chrono::high_resolution_clock::now(); + + /* Compute the residual */ + level.computeResidual(residual, rhs, solution); + + auto end_MGC_residual = std::chrono::high_resolution_clock::now(); + t_avg_MGC_residual += std::chrono::duration(end_MGC_residual - start_MGC_residual).count(); + + /* -------------------------- */ + /* Solve A * error = residual */ + if (level_depth + 1 == number_of_levels_ - 1) { + /* --------------------- */ + /* Using a direct solver */ + /* --------------------- */ + + /* Step 1: Restrict the residual */ + restriction(level_depth, next_level.GPU_residual(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_residual(), next_level.residual()); + } + + /* Step 2: Solve for the error in place */ + auto start_MGC_directSolver = std::chrono::high_resolution_clock::now(); + + next_level.directSolveInPlace(next_level.residual()); + + auto end_MGC_directSolver = std::chrono::high_resolution_clock::now(); + t_avg_MGC_directSolver += std::chrono::duration(end_MGC_directSolver - start_MGC_directSolver).count(); + } + else { + /* ------------------------------------------ */ + /* By recursively calling the multigrid cycle */ + /* ------------------------------------------ */ + + /* Step 1: Restrict the residual. */ + restriction(level_depth, next_level.GPU_error_correction(), residual); + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_error_correction(), next_level.error_correction()); + } + + /* Step 2: Set starting error to zero. */ + if(next_level.processingType() == ProcessingType::GPU){ + assign(next_level.GPU_residual(), 0.0); + } else { + assign(next_level.residual(), 0.0); + } + + /* Step 3: Solve for the error by recursively calling the multigrid cycle. */ + if(next_level.processingType() == ProcessingType::GPU){ + multigrid_W_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + multigrid_W_Cycle(level_depth + 1, next_level.GPU_residual(), next_level.GPU_error_correction(), next_level.GPU_solution()); + } else { + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + multigrid_W_Cycle(level_depth + 1, next_level.residual(), next_level.error_correction(), next_level.solution()); + } + } + + /* Interpolate the correction */ + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + prolongation(level_depth + 1, residual, next_level.GPU_residual()); + + /* Compute the corrected approximation: u = u + error */ + add(solution, residual); + + auto start_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + + /* ------------- */ + /* Postsmoothing */ + for (int i = 0; i < post_smoothing_steps_; i++) { + level.smoothingInPlace(solution, rhs, residual); + } + + auto end_MGC_postSmoothing = std::chrono::high_resolution_clock::now(); + t_avg_MGC_postSmoothing += std::chrono::duration(end_MGC_postSmoothing - start_MGC_postSmoothing).count(); + + auto end_MGC = std::chrono::high_resolution_clock::now(); + t_avg_MGC_total += std::chrono::duration(end_MGC - start_MGC).count(); +} \ No newline at end of file diff --git a/src/GMGPolar/build_rhs.cu b/src/GMGPolar/build_rhs.cu new file mode 100644 index 00000000..bda8614c --- /dev/null +++ b/src/GMGPolar/build_rhs.cu @@ -0,0 +1,268 @@ +#include "../../include/GMGPolar/gmgpolar.h" + + +void GMGPolar::build_rhs_f(const Level& level, Vector& rhs_f) +{ + const PolarGrid& grid = level.grid(); + assert(rhs_f.size() == grid.numberOfNodes()); + + const auto& sin_theta_cache = level.levelCache().sin_theta(); + const auto& cos_theta_cache = level.levelCache().cos_theta(); + + #pragma omp parallel + { + // ----------------------------------------- // + // Store rhs values (circular index section) // + // ----------------------------------------- // + #pragma omp for nowait + for (int i_r = 0; i_r < grid.numberSmootherCircles(); i_r++) + { + double r = grid.radius(i_r); + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) + { + double theta = grid.theta(i_theta); + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + if ((0 < i_r && i_r < grid.nr() - 1) || (i_r == 0 && !DirBC_Interior_)) + { + rhs_f[grid.index(i_r, i_theta)] = source_term_->rhs_f(r, theta, sin_theta, cos_theta); + } + else if (i_r == 0 && DirBC_Interior_) + { + rhs_f[grid.index(i_r, i_theta)] = boundary_conditions_->u_D_Interior(r, theta, sin_theta, cos_theta); + } + else if (i_r == grid.nr() - 1) + { + rhs_f[grid.index(i_r, i_theta)] = boundary_conditions_->u_D(r, theta, sin_theta, cos_theta); + } + } + } + + // --------------------------------------- // + // Store rhs values (radial index section) // + // --------------------------------------- // + #pragma omp for + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) + { + double theta = grid.theta(i_theta); + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + for (int i_r = grid.numberSmootherCircles(); i_r < grid.nr(); i_r++) + { + double r = grid.radius(i_r); + if ((0 < i_r && i_r < grid.nr() - 1) || (i_r == 0 && !DirBC_Interior_)) + { + rhs_f[grid.index(i_r, i_theta)] = source_term_->rhs_f(r, theta, sin_theta, cos_theta); + } + else if (i_r == 0 && DirBC_Interior_) + { + rhs_f[grid.index(i_r, i_theta)] = boundary_conditions_->u_D_Interior(r, theta, sin_theta, cos_theta); + } + else if (i_r == grid.nr() - 1) + { + rhs_f[grid.index(i_r, i_theta)] = boundary_conditions_->u_D(r, theta, sin_theta, cos_theta); + } + } + } + } +} + +void GMGPolar::discretize_rhs_f(const Level& level, Vector& rhs_f) +{ + const PolarGrid& grid = level.grid(); + assert(rhs_f.size() == grid.numberOfNodes()); + + const auto& detDF_cache = level.levelCache().detDF(); + #pragma omp parallel + { + // ---------------------------------------------- // + // Discretize rhs values (circular index section) // + // ---------------------------------------------- // + #pragma omp for nowait + for (int i_r = 0; i_r < grid.numberSmootherCircles(); i_r++) + { + double r = grid.radius(i_r); + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) + { + double theta = grid.theta(i_theta); + if ((0 < i_r && i_r < grid.nr() - 1) || (i_r == 0 && !DirBC_Interior_)) + { + double h1 = (i_r == 0) ? 2.0 * grid.radius(0) : grid.radialSpacing(i_r - 1); + double h2 = grid.radialSpacing(i_r); + double k1 = grid.angularSpacing(i_theta - 1); + double k2 = grid.angularSpacing(i_theta); + const double detDF = detDF_cache[grid.index(i_r, i_theta)]; + rhs_f[grid.index(i_r, i_theta)] *= 0.25 * (h1 + h2) * (k1 + k2) * fabs(detDF); + } + else if (i_r == 0 && DirBC_Interior_) + { + rhs_f[grid.index(i_r, i_theta)] *= 1.0; + } + else if (i_r == grid.nr() - 1) + { + rhs_f[grid.index(i_r, i_theta)] *= 1.0; + } + } + } + + // -------------------------------------------- // + // Discretize rhs values (radial index section) // + // -------------------------------------------- // + #pragma omp for nowait + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) + { + double theta = grid.theta(i_theta); + for (int i_r = grid.numberSmootherCircles(); i_r < grid.nr(); i_r++) + { + double r = grid.radius(i_r); + if ((0 < i_r && i_r < grid.nr() - 1) || (i_r == 0 && !DirBC_Interior_)) + { + double h1 = (i_r == 0) ? 2.0 * grid.radius(0) : grid.radialSpacing(i_r - 1); + double h2 = grid.radialSpacing(i_r); + double k1 = grid.angularSpacing(i_theta - 1); + double k2 = grid.angularSpacing(i_theta); + const double detDF = detDF_cache[grid.index(i_r, i_theta)]; + rhs_f[grid.index(i_r, i_theta)] *= 0.25 * (h1 + h2) * (k1 + k2) * fabs(detDF); + } + else if (i_r == 0 && DirBC_Interior_) + { + rhs_f[grid.index(i_r, i_theta)] *= 1.0; + } + else if (i_r == grid.nr() - 1) + { + rhs_f[grid.index(i_r, i_theta)] *= 1.0; + } + } + } + } +} + + + +__global__ void build_rhs_f_kernel(PolarGrid* grid, double* rhs_f, double* sin_theta_cache, double* cos_theta_cache, bool DirBC_Interior, SourceTerm* source_term, BoundaryConditions* boundary_conditions) { + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= grid->nr() || i_theta >= grid->ntheta()) return; + + double r = grid->radius(i_r); + double theta = grid->theta(i_theta); + + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + double value; + + if ((0 < i_r && i_r < grid->nr() - 1) || (i_r == 0 && !DirBC_Interior)) + { + value = source_term->rhs_f(r, theta, sin_theta, cos_theta); + } + else if (i_r == 0 && DirBC_Interior) + { + value = boundary_conditions->u_D_Interior(r, theta, sin_theta, cos_theta); + } + else if (i_r == grid->nr() - 1) + { + value = boundary_conditions->u_D(r, theta, sin_theta, cos_theta); + } + + rhs_f[grid->index(i_r, i_theta)] = value; +} + +void GMGPolar::build_rhs_f(const Level& level, GPU_Vector& rhs_f) +{ + const PolarGrid& grid = level.grid(); + assert(rhs_f.size() == grid.numberOfNodes()); + + const GPU_Vector& sin_theta_cache = level.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level.levelCache().GPU_cos_theta(); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + SourceTerm* device_source_term; + cudaMalloc(&device_source_term, sizeof(SourceTerm)); + cudaMemcpy(device_source_term, source_term_.get(), sizeof(SourceTerm), cudaMemcpyHostToDevice); + BoundaryConditions* device_boundary_conditions; + cudaMalloc(&device_boundary_conditions, sizeof(BoundaryConditions)); + cudaMemcpy(device_boundary_conditions, boundary_conditions_.get(), sizeof(BoundaryConditions), cudaMemcpyHostToDevice); + + build_rhs_f_kernel<<>>( + level.device_grid(), rhs_f.data(), sin_theta_cache.data(), cos_theta_cache.data(), DirBC_Interior_, device_source_term, device_boundary_conditions); + + cudaDeviceSynchronize(); + + cudaFree(device_source_term); + cudaFree(device_boundary_conditions); +} + +__global__ void discretize_rhs_f_kernel(PolarGrid* grid, double* rhs_f, double* sin_theta_cache, double* cos_theta_cache, bool DirBC_Interior, DomainGeometry* domain_geometry) { + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= grid->nr() || i_theta >= grid->ntheta()) return; + + double r = grid->radius(i_r); + double theta = grid->theta(i_theta); + + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + double value; + + if ((0 < i_r && i_r < grid->nr() - 1) || (i_r == 0 && !DirBC_Interior)) + { + double h1 = (i_r == 0) ? 2.0 * grid->radius(0) : grid->radialSpacing(i_r - 1); + double h2 = grid->radialSpacing(i_r); + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + /* Calculate the elements of the Jacobian matrix for the transformation mapping */ + /* The Jacobian matrix is: */ + /* [Jrr, Jrt] */ + /* [Jtr, Jtt] */ + double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + /* Compute the determinant of the Jacobian matrix */ + double detDF = Jrr * Jtt - Jrt * Jtr; + value = 0.25 * (h1 + h2) * (k1 + k2) * fabs(detDF); + } + else if (i_r == 0 && DirBC_Interior) + { + value = 1.0; + } + else if (i_r == grid->nr() - 1) + { + value = 1.0; + } + + rhs_f[grid->index(i_r, i_theta)] *= value; +} + +void GMGPolar::discretize_rhs_f(const Level& level, GPU_Vector& rhs_f) +{ + const PolarGrid& grid = level.grid(); + assert(rhs_f.size() == grid.numberOfNodes()); + + const GPU_Vector& sin_theta_cache = level.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level.levelCache().GPU_cos_theta(); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, domain_geometry_.get(), sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + discretize_rhs_f_kernel<<>>( + level.device_grid(), rhs_f.data(), sin_theta_cache.data(), cos_theta_cache.data(), DirBC_Interior_, device_domain_geometry); + + cudaDeviceSynchronize(); + + cudaFree(device_domain_geometry); +} diff --git a/src/GMGPolar/compute_exact_error.cu b/src/GMGPolar/compute_exact_error.cu new file mode 100644 index 00000000..3e6d1ce4 --- /dev/null +++ b/src/GMGPolar/compute_exact_error.cu @@ -0,0 +1,109 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +std::pair GMGPolar::computeExactError(Level& level, const Vector& solution, + Vector& error) +{ + assert(exact_solution_ != nullptr); + + const PolarGrid& grid = level.grid(); + const LevelCache& levelCache = level.levelCache(); + const auto& sin_theta_cache = levelCache.sin_theta(); + const auto& cos_theta_cache = levelCache.cos_theta(); + + assert(solution.size() == error.size()); + assert(solution.size() == grid.numberOfNodes()); + +#pragma omp parallel + { +#pragma omp for nowait + for (int i_r = 0; i_r < grid.numberSmootherCircles(); i_r++) { + double r = grid.radius(i_r); + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) { + double theta = grid.theta(i_theta); + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + error[grid.index(i_r, i_theta)] = exact_solution_->exact_solution(r, theta, sin_theta, cos_theta) - + solution[grid.index(i_r, i_theta)]; + } + } +#pragma omp for nowait + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) { + double theta = grid.theta(i_theta); + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + for (int i_r = grid.numberSmootherCircles(); i_r < grid.nr(); i_r++) { + double r = grid.radius(i_r); + error[grid.index(i_r, i_theta)] = exact_solution_->exact_solution(r, theta, sin_theta, cos_theta) - + solution[grid.index(i_r, i_theta)]; + } + } + } + + double weighted_euclidean_error = l2_norm(error) / sqrt(grid.numberOfNodes()); + double infinity_error = infinity_norm(error); + + return std::make_pair(weighted_euclidean_error, infinity_error); +} + + +__global__ void computeExactError_kernel( + double* solution, double* error, + PolarGrid* grid, ExactSolution* exact_solution, + double* sin_theta_cache, double* cos_theta_cache) +{ + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r < 0 || i_r >= grid->nr() || i_theta < 0 || i_theta >= grid->ntheta()) return; + + double r = grid->radius(i_r); + double theta = grid->theta(i_theta); + + double sin_theta = sin_theta_cache[i_theta]; + double cos_theta = cos_theta_cache[i_theta]; + + int index = grid->index(i_r, i_theta); + + error[index] = exact_solution->exact_solution(r, theta, sin_theta, cos_theta) - solution[index]; +} + + +std::pair GMGPolar::computeExactError(Level& level, const GPU_Vector& solution, + GPU_Vector& error) +{ + assert(exact_solution_ != nullptr); + + const PolarGrid& grid = level.grid(); + + assert(solution.size() == error.size()); + assert(solution.size() == grid.numberOfNodes()); + + const GPU_Vector& sin_theta_cache = level.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level.levelCache().GPU_cos_theta(); + + ExactSolution* device_exact_solution; + cudaMalloc(&device_exact_solution, sizeof(ExactSolution)); + cudaMemcpy(device_exact_solution, exact_solution_.get(), sizeof(ExactSolution), cudaMemcpyHostToDevice); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + computeExactError_kernel<<>>( + solution.data(), error.data(), + level.device_grid(), device_exact_solution, + sin_theta_cache.data(), cos_theta_cache.data() + ); + + cudaDeviceSynchronize(); + + cudaFree(device_exact_solution); + + double weighted_euclidean_error = l2_norm(error) / sqrt(grid.numberOfNodes()); + double infinity_error = infinity_norm(error); + + return std::make_pair(weighted_euclidean_error, infinity_error); +} diff --git a/src/GMGPolar/extrapolated_residual.cu b/src/GMGPolar/extrapolated_residual.cu new file mode 100644 index 00000000..ede3f5d8 --- /dev/null +++ b/src/GMGPolar/extrapolated_residual.cu @@ -0,0 +1,99 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +void GMGPolar::extrapolatedResidual(const int current_level, Vector& residual, + const Vector& residual_next_level) +{ + const PolarGrid& fineGrid = levels_[current_level].grid(); + const PolarGrid& coarseGrid = levels_[current_level + 1].grid(); + + assert(residual.size() == fineGrid.numberOfNodes()); + assert(residual_next_level.size() == coarseGrid.numberOfNodes()); + +#pragma omp parallel + { +/* Circluar Indexing Section */ +/* For loop matches circular access pattern */ +#pragma omp for nowait + for (int i_r = 0; i_r < fineGrid.numberSmootherCircles(); i_r++) { + int i_r_coarse = i_r >> 1; + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) { + int i_theta_coarse = i_theta >> 1; + + if (i_r & 1 || i_theta & 1) { + residual[fineGrid.index(i_r, i_theta)] *= 4.0 / 3.0; + } + else { + int fine_idx = fineGrid.index(i_r, i_theta); + int coarse_idx = coarseGrid.index(i_r_coarse, i_theta_coarse); + residual[fine_idx] = (4.0 * residual[fine_idx] - residual_next_level[coarse_idx]) / 3.0; + } + } + } + +/* Radial Indexing Section */ +/* For loop matches radial access pattern */ +#pragma omp for nowait + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) { + int i_theta_coarse = i_theta >> 1; + for (int i_r = fineGrid.numberSmootherCircles(); i_r < fineGrid.nr(); i_r++) { + int i_r_coarse = i_r >> 1; + + if (i_r & 1 || i_theta & 1) { + residual[fineGrid.index(i_r, i_theta)] *= 4.0 / 3.0; + } + else { + int fine_idx = fineGrid.index(i_r, i_theta); + int coarse_idx = coarseGrid.index(i_r_coarse, i_theta_coarse); + residual[fine_idx] = (4.0 * residual[fine_idx] - residual_next_level[coarse_idx]) / 3.0; + } + } + } + } +} + + +__global__ void applyExtrapolatedResidual_kernel( + double* residual, double* residual_next_level, + PolarGrid* fineGrid, PolarGrid* coarseGrid) +{ + + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r < 0 || i_r >= fineGrid->nr() || i_theta < 0 || i_theta >= fineGrid->ntheta()) return; + + int i_r_coarse = i_r >> 1; + int i_theta_coarse = i_theta >> 1; + + int fine_idx = fineGrid->index(i_r, i_theta); + + if (i_r & 1 || i_theta & 1) { + residual[fine_idx] *= 4.0 / 3.0; + } + else { + int coarse_idx = coarseGrid->index(i_r_coarse, i_theta_coarse); + residual[fine_idx] = (4.0 * residual[fine_idx] - residual_next_level[coarse_idx]) / 3.0; + } + +} + +void GMGPolar::extrapolatedResidual(const int current_level, GPU_Vector& residual, + const GPU_Vector& residual_next_level) +{ + const PolarGrid& fineGrid = levels_[current_level].grid(); + const PolarGrid& coarseGrid = levels_[current_level + 1].grid(); + + assert(residual.size() == fineGrid.numberOfNodes()); + assert(residual_next_level.size() == coarseGrid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((fineGrid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (fineGrid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyExtrapolatedResidual_kernel<<>>( + residual.data(), residual_next_level.data(), + levels_[current_level].device_grid(), levels_[current_level+1].device_grid() + ); + + cudaDeviceSynchronize(); +} diff --git a/src/GMGPolar/gmgpolar.cpp b/src/GMGPolar/gmgpolar.cpp new file mode 100644 index 00000000..ec3f3095 --- /dev/null +++ b/src/GMGPolar/gmgpolar.cpp @@ -0,0 +1,60 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +// #include + +GMGPolar::GMGPolar(std::unique_ptr domain_geometry, + std::unique_ptr density_profile_coefficients, + std::unique_ptr boundary_conditions, + std::unique_ptr source_term) : + + domain_geometry_(std::move(domain_geometry)), + density_profile_coefficients_(std::move(density_profile_coefficients)), + boundary_conditions_(std::move(boundary_conditions)), + source_term_(std::move(source_term)), + parser_() +{ + resetTimings(); + initializeGrid(); initializeMultigrid(); initializeGeneral(); + parseGrid(); parseMultigrid(); parseGeneral(); +} + + +void GMGPolar::setParameters(int argc, char* argv[]) { + if(argc != 0){ + try { + parser_.parse_check(argc, argv); + } catch (const cmdline::cmdline_error& parse_error) { + std::cerr << "Error: " << parse_error.what() << std::endl; + std::cerr << "Usage: " << parser_.usage() << std::endl; + } + } + parseGrid(); parseMultigrid(); parseGeneral(); +} + + +void GMGPolar::setSolution(std::unique_ptr exact_solution) { + exact_solution_ = std::move(exact_solution); +} + +void GMGPolar::printTimings() const { + std::cout << "\n------------------"<< std::endl; + std::cout << "Timing Information" << std::endl; + std::cout << "------------------"<< std::endl; + std::cout << "Setup Time: " << t_setup_total-t_setup_rhs << " seconds" << std::endl; + std::cout << " Create Levels: " << t_setup_createLevels << " seconds" << std::endl; + std::cout << " Smoother: " << t_setup_smoother << " seconds" << std::endl; + std::cout << " Direct Solver: " << t_setup_directSolver << " seconds" << std::endl; + std::cout << " (Build rhs: " << t_setup_rhs << " seconds)" << std::endl; + std::cout << "\nSolve Time: " << t_solve_total << " seconds" << std::endl; + std::cout << " Initial Approximation: " << t_solve_initial_approximation << " seconds" << std::endl; + std::cout << " Multigrid Iteration: " << t_solve_multigrid_iterations << " seconds" << std::endl; + std::cout << " Check Convergence: " << t_check_convergence << " seconds" << std::endl; + std::cout << " (Check Exact Error: " << t_check_exact_error << " seconds)" << std::endl; + std::cout << "\nAverage Multigrid Iteration: " << t_avg_MGC_total << " seconds" << std::endl; + std::cout << " Pre Smoothing: " << t_avg_MGC_preSmoothing << " seconds" << std::endl; + std::cout << " Post Smoothing: " << t_avg_MGC_postSmoothing << " seconds" << std::endl; + std::cout << " Residual: " << t_avg_MGC_residual << " seconds" << std::endl; + std::cout << " Direct Solve: " << t_avg_MGC_directSolver << " seconds" << std::endl; + std::cout << " Other Computations: " << std::max(t_avg_MGC_total - t_avg_MGC_preSmoothing - t_avg_MGC_postSmoothing - t_avg_MGC_residual - t_avg_MGC_directSolver, 0.0) << " seconds" << std::endl; + std::cout <<"\n"<< std::endl; +} \ No newline at end of file diff --git a/src/GMGPolar/level_interpolation.cpp b/src/GMGPolar/level_interpolation.cpp new file mode 100644 index 00000000..c5b20cdd --- /dev/null +++ b/src/GMGPolar/level_interpolation.cpp @@ -0,0 +1,99 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +void GMGPolar::prolongation(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyProlongation(levels_[current_level], levels_[current_level - 1], result, x); +} + +void GMGPolar::restriction(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyRestriction(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::injection(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyInjection(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::extrapolatedProlongation(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyExtrapolatedProlongation(levels_[current_level], levels_[current_level - 1], result, x); +} + +void GMGPolar::extrapolatedRestriction(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyExtrapolatedRestriction(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::FMGInterpolation(const int current_level, Vector& result, const Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyFMGInterpolation(levels_[current_level], levels_[current_level - 1], result, x); +} + + + +void GMGPolar::prolongation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyProlongation(levels_[current_level], levels_[current_level - 1], result, x); +} + +void GMGPolar::restriction(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyRestriction(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::injection(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyInjection(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::extrapolatedProlongation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyExtrapolatedProlongation(levels_[current_level], levels_[current_level - 1], result, x); +} + +void GMGPolar::extrapolatedRestriction(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ - 1 && 0 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyExtrapolatedRestriction(levels_[current_level], levels_[current_level + 1], result, x); +} + +void GMGPolar::FMGInterpolation(const int current_level, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(current_level < number_of_levels_ && 1 <= current_level); + if (!interpolation_) throw std::runtime_error("Interpolation not initialized."); + + interpolation_->applyFMGInterpolation(levels_[current_level], levels_[current_level - 1], result, x); +} \ No newline at end of file diff --git a/src/GMGPolar/parser.cpp b/src/GMGPolar/parser.cpp new file mode 100644 index 00000000..19ae7eac --- /dev/null +++ b/src/GMGPolar/parser.cpp @@ -0,0 +1,206 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +/* Specifies whether user input is required */ +enum +{ + OPTIONAL = 0, + REQUIRED = 1 +}; + +void GMGPolar::parseGrid() { + R0_ = parser_.get("R0"); + Rmax_ = parser_.get("Rmax"); + nr_exp_ = parser_.get("nr_exp"); + ntheta_exp_ = parser_.get("ntheta_exp"); + anisotropic_factor_ = parser_.get("anisotropic_factor"); + divideBy2_ = parser_.get("divideBy2"); + DirBC_Interior_ = parser_.get("DirBC_Interior") != 0; +} + +void GMGPolar::parseMultigrid() { + FMG_ = parser_.get("FMG") != 0; + FMG_iterations_ = parser_.get("FMG_iterations"); + const int FMG_cycleValue = parser_.get("FMG_cycle"); + if (FMG_cycleValue == static_cast(MultigridCycleType::V_CYCLE) || + FMG_cycleValue == static_cast(MultigridCycleType::W_CYCLE) || + FMG_cycleValue == static_cast(MultigridCycleType::F_CYCLE)) { + FMG_cycle_ = static_cast(FMG_cycleValue); + } else { + throw std::runtime_error("Invalid extrapolation value.\n"); + } + const int extrapolationValue = parser_.get("extrapolation"); + if (extrapolationValue == static_cast(ExtrapolationType::NONE) || + extrapolationValue == static_cast(ExtrapolationType::IMPLICIT_EXTRAPOLATION) || + extrapolationValue == static_cast(ExtrapolationType::IMPLICIT_FULL_GRID_SMOOTHING) || + extrapolationValue == static_cast(ExtrapolationType::COMBINED)) { + extrapolation_ = static_cast(extrapolationValue); + } else { + throw std::runtime_error("Invalid extrapolation value.\n"); + } + max_levels_ = parser_.get("maxLevels"); + gpu_levels_ = parser_.get("gpuLevels"); + pre_smoothing_steps_ = parser_.get("preSmoothingSteps"); + post_smoothing_steps_ = parser_.get("postSmoothingSteps"); + + const int cycleValue = parser_.get("multigridCycle"); + if (cycleValue == static_cast(MultigridCycleType::V_CYCLE) || + cycleValue == static_cast(MultigridCycleType::W_CYCLE) || + cycleValue == static_cast(MultigridCycleType::F_CYCLE)) { + multigrid_cycle_ = static_cast(cycleValue); + } else { + throw std::runtime_error("Invalid multigrid cycle value.\n"); + } + + max_iterations_ = parser_.get("maxIterations"); + + const int normValue = parser_.get("residualNormType"); + if (normValue == static_cast(ResidualNormType::EUCLIDEAN) || + normValue == static_cast(ResidualNormType::WEIGHTED_EUCLIDEAN) || + normValue == static_cast(ResidualNormType::INFINITY_NORM)) { + residual_norm_type_ = static_cast(normValue); + } else { + throw std::runtime_error("Invalid residual norm type.\n"); + } + + double absTol = parser_.get("absoluteTolerance"); + if (absTol < 0) { + absolute_tolerance_ = std::nullopt; + } else { + absolute_tolerance_ = absTol; + } + double relTol = parser_.get("relativeTolerance"); + if (relTol < 0) { + relative_tolerance_ = std::nullopt; + } else { + relative_tolerance_ = relTol; + } +} + +void GMGPolar::parseGeneral() { + verbose_ = parser_.get("verbose"); + paraview_ = parser_.get("paraview") != 0; + max_omp_threads_ = parser_.get("maxOpenMPThreads"); omp_set_num_threads(max_omp_threads_); +} + + +void GMGPolar::initializeGrid() { + parser_.add( + "R0", 'r', "Interior radius of the disk.", + OPTIONAL, 1e-5 + ); + parser_.add( + "Rmax", 'R', "Exterior radius of the disk.", + OPTIONAL, 1.3 + ); + parser_.add( + "nr_exp", 'n', + "Number of nodes (exponents) in the radial direction.", + OPTIONAL, 5 + ); + parser_.add( + "ntheta_exp", '\0', + "Number of nodes (exponents) in the angular direction.", + OPTIONAL, -1 + ); + parser_.add( + "anisotropic_factor", '\0', + "Defines anisotropic discretization in the radial direction.", + OPTIONAL, 0 + ); + parser_.add( + "divideBy2", '\0', + "Refines the grid globally `divideBy2` times.", + OPTIONAL, 0 + ); + parser_.add( + "DirBC_Interior", '\0', "Defines the boundary condition on the interior circle: Across-origin (0), Dirichlet boundary (1).", + OPTIONAL, 0, cmdline::oneof(0,1) + ); +} + +void GMGPolar::initializeMultigrid() { + parser_.add( + "FMG", '\0', + "Specifies whether the initial approximation is obtained by nested iteration.", + OPTIONAL, 0, cmdline::oneof(0,1) + ); + parser_.add( + "FMG_iterations", '\0', + "Specifies the number of FMG iterations.", + OPTIONAL, 2 + ); + parser_.add( + "FMG_cycle", '\0', + "Specifies the type of FMG Cycle: V-cycle (0), W-cycle (1), F-cycle (2).", + OPTIONAL, 0, cmdline::oneof(0,1,2) + ); + parser_.add( + "extrapolation", 'e', + "Specifies the type of extrapolation: No extrapolation (0), Implicit extrapolation (1), Implicit extrapolation with full grid smoothing (2), Combination of both methods (3).", + OPTIONAL, 0, cmdline::oneof(0,1,2,3) + ); + parser_.add( + "maxLevels", 'l', + "Defines the maximum number of levels in the multigrid scheme.", + OPTIONAL, -1 + ); + parser_.add( + "gpuLevels", '\0', + "Defines the number of GPU multigrid levels.", + OPTIONAL, -1 + ); + parser_.add( + "preSmoothingSteps", '\0', + "Number of pre-smoothing steps.", + OPTIONAL, 1 + ); + parser_.add( + "postSmoothingSteps", '\0', + "Number of post-smoothing steps.", + OPTIONAL, 1 + ); + parser_.add( + "multigridCycle", '\0', + "Type of Multigrid Cycle: V-cycle (0), W-cycle (1), F-cycle (2).", + OPTIONAL, 0, cmdline::oneof(0, 1, 2) + ); + + parser_.add( + "residualNormType", '\0', + "Type of Residual Norm: Euclidean (0), Weighted Euclidean (1), Infinity (2).", + OPTIONAL, 0, cmdline::oneof(0, 1, 2) + ); + parser_.add( + "maxIterations", '\0', + "Maximum number of Multigrid iterations.", + OPTIONAL, 150 + ); + parser_.add( + "absoluteTolerance", '\0', + "Convergence achieved when absolute tolerance is reached.", + OPTIONAL, 1e-8 + ); + parser_.add( + "relativeTolerance", '\0', + "Convergence achieved when relative tolerance is reached.", + OPTIONAL, 1e-8 + ); +} + +void GMGPolar::initializeGeneral() { + parser_.add( + "verbose", '\0', + "Controls the verbosity of the output. Higher values produce more detailed diagnostic information.", + OPTIONAL, 1 + ); + parser_.add( + "paraview", '\0', + "Specifies whether to generate Paraview output files.", + OPTIONAL, 0 + ); + parser_.add( + "maxOpenMPThreads", '\0', + "Defines the maximum number of OpenMP threads used.", + OPTIONAL, 1 + ); +} \ No newline at end of file diff --git a/src/GMGPolar/setup.cpp b/src/GMGPolar/setup.cpp new file mode 100644 index 00000000..ede1a3c5 --- /dev/null +++ b/src/GMGPolar/setup.cpp @@ -0,0 +1,264 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +#include +#include + +// clang-format off +void GMGPolar::setup() { + auto start_setup = std::chrono::high_resolution_clock::now(); + + resetTimings(); + + auto start_setup_createLevels = std::chrono::high_resolution_clock::now(); + + // -------------------------------- // + // Create the finest mesh (level 0) // + // -------------------------------- // + auto finest_grid = std::make_unique(createFinestGrid()); /* Implementation below */ + if(verbose_ > 0) { + std::cout << "System of size (nr x ntheta) = (" << finest_grid->nr() << " x " << finest_grid->ntheta() << ")\n"; + std::cout << "on the coordinates (r x theta): (" << R0_ << ", " << Rmax_ << ") x (" << 0 << ", " << 2 * M_PI << ")\n"; + + std::cout << "Anisotropy factor: " << anisotropic_factor_ << std::endl; + std::cout << "Dirichlet boundary (interior): " << DirBC_Interior_ << std::endl; + } + if(paraview_) writeToVTK("output_finest_grid", *finest_grid); + + // ----------------------------------------- // + // Definining the number of multigrid levels // + // ----------------------------------------- // + + number_of_levels_ = chooseNumberOfLevels(*finest_grid); /* Implementation below */ + assert(number_of_levels_ >= 2); + + int actual_gpu_levels; + if(gpu_levels_ < 0 || gpu_levels_ >= number_of_levels_){ + actual_gpu_levels = number_of_levels_ - 1; + } else{ + actual_gpu_levels = gpu_levels_; + } + + if(verbose_ > 0) std::cout <<"Number of levels: "< 0) std::cout <<"Number of GPU levels: "< processing_type(number_of_levels_); + for (int level = 0; level < number_of_levels_; level++){ + if (level < actual_gpu_levels) { + processing_type[level] = ProcessingType::GPU; + } else if (level == actual_gpu_levels) { + processing_type[level] = ProcessingType::CPU_HYBRID; + } else { + processing_type[level] = ProcessingType::CPU; + } + } + /* If no GPU levels exist, CPU_Hybrid is set to CPU. */ + if(processing_type[0] != ProcessingType::GPU){ + for (int level = 0; level < number_of_levels_; level++) + processing_type[level] = ProcessingType::CPU; + } + + int finest_level = 0; + auto finest_levelCache = std::make_unique(processing_type[finest_level], *finest_grid, *density_profile_coefficients_, *domain_geometry_); + levels_.emplace_back(finest_level, processing_type[finest_level], std::move(finest_grid), std::move(finest_levelCache), extrapolation_, FMG_); + + for(int current_level = 1; current_level < number_of_levels_; current_level++) { + auto current_grid = std::make_unique(coarseningGrid(levels_[current_level-1].grid())); + auto current_levelCache = std::make_unique(processing_type[current_level], *current_grid, *density_profile_coefficients_, *domain_geometry_); + levels_.emplace_back(current_level, processing_type[current_level], std::move(current_grid), std::move(current_levelCache), extrapolation_, FMG_); + } + + auto end_setup_createLevels = std::chrono::high_resolution_clock::now(); + t_setup_createLevels += std::chrono::duration(end_setup_createLevels - start_setup_createLevels).count(); + + if(paraview_) writeToVTK("output_coarsest_grid", levels_.back().grid()); + + if(verbose_ > 0) std::cout <<"Maxmimum number of threads: "<(DirBC_Interior_); + + auto start_setup_rhs = std::chrono::high_resolution_clock::now(); + + // ------------------------------------- // + // Build rhs_f on Level 0 (finest Level) // + // ------------------------------------- // + if(levels_[0].processingType() == ProcessingType::GPU){ + build_rhs_f(levels_[0], levels_[0].GPU_rhs()); + } else{ + build_rhs_f(levels_[0], levels_[0].rhs()); + } + + /* ---------------- */ + /* Discretize rhs_f */ + /* ---------------- */ + int initial_rhs_f_levels = FMG_ ? number_of_levels_ : (extrapolation_ == ExtrapolationType::NONE ? 1 : 2); + /* Loop through the levels, injecting and discretizing rhs */ + for (int level_idx = 0; level_idx < initial_rhs_f_levels; level_idx++) + { + Level& current_level = levels_[level_idx]; + // Inject rhs if there is a next level + if (level_idx + 1 < initial_rhs_f_levels) { + Level& next_level = levels_[level_idx + 1]; + + /* Injection */ + if(current_level.processingType() == ProcessingType::GPU){ + assert(next_level.processingType() != ProcessingType::CPU); + injection(level_idx, next_level.GPU_rhs(), current_level.GPU_rhs()); + } else{ + assert(next_level.processingType() == ProcessingType::CPU); + injection(level_idx, next_level.rhs(), current_level.rhs()); + } + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyDeviceToHost(next_level.GPU_rhs(), next_level.rhs()); + } + + } + /* Discretize the rhs for the current level */ + if(current_level.processingType() == ProcessingType::GPU){ + discretize_rhs_f(current_level, current_level.GPU_rhs()); + } else{ + discretize_rhs_f(current_level, current_level.rhs()); + } + } + + auto end_setup_rhs = std::chrono::high_resolution_clock::now(); + t_setup_rhs += std::chrono::duration(end_setup_rhs - start_setup_rhs).count(); + + // ------------------------------------------------------- + // Initializing various operators based on the level index + for (int current_level = 0; current_level < number_of_levels_; current_level++){ + // ---------------------- // + // Level 0 (finest Level) // + // ---------------------- // + if(current_level == 0){ + auto start_setup_smoother = std::chrono::high_resolution_clock::now(); + switch(extrapolation_) { + case ExtrapolationType::NONE: + full_grid_smoothing_ = true; + levels_[current_level].initializeSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + break; + case ExtrapolationType::IMPLICIT_EXTRAPOLATION: + full_grid_smoothing_ = false; + levels_[current_level].initializeExtrapolatedSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + break; + case ExtrapolationType::IMPLICIT_FULL_GRID_SMOOTHING: + full_grid_smoothing_ = true; + levels_[current_level].initializeSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + break; + case ExtrapolationType::COMBINED: + full_grid_smoothing_ = true; + levels_[current_level].initializeSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + levels_[current_level].initializeExtrapolatedSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + break; + default: + full_grid_smoothing_ = false; + levels_[current_level].initializeSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + levels_[current_level].initializeExtrapolatedSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + break; + } + auto end_setup_smoother = std::chrono::high_resolution_clock::now(); + t_setup_smoother += std::chrono::duration(end_setup_smoother - start_setup_smoother).count(); + levels_[current_level].initializeResidual(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + } + // -------------------------- // + // Level n-1 (coarsest Level) // + // -------------------------- // + else if(current_level == number_of_levels_ - 1){ + assert(levels_[current_level].processingType() != ProcessingType::GPU); + auto start_setup_directSolver = std::chrono::high_resolution_clock::now(); + levels_[current_level].initializeDirectSolver(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + auto end_setup_directSolver = std::chrono::high_resolution_clock::now(); + t_setup_directSolver += std::chrono::duration(end_setup_directSolver - start_setup_directSolver).count(); + levels_[current_level].initializeResidual(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + } + // ------------------- // + // Intermediate levels // + // ------------------- // + else{ + auto start_setup_smoother = std::chrono::high_resolution_clock::now(); + levels_[current_level].initializeSmoothing(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + auto end_setup_smoother = std::chrono::high_resolution_clock::now(); + t_setup_smoother += std::chrono::duration(end_setup_smoother - start_setup_smoother).count(); + levels_[current_level].initializeResidual(*domain_geometry_, *density_profile_coefficients_, DirBC_Interior_); + } + } + + auto end_setup = std::chrono::high_resolution_clock::now(); + t_setup_total += std::chrono::duration(end_setup - start_setup).count(); +} + + + +PolarGrid GMGPolar::createFinestGrid() { + const double& refinement_radius = density_profile_coefficients_->getAlphaJump(); /* Radius of anisotropic grid refinement */ + std::optional splitting_radius = std::nullopt; /* (Automatic) line splitting radius for the smoother */ + PolarGrid finest_grid(R0_, Rmax_, nr_exp_, ntheta_exp_, refinement_radius, anisotropic_factor_, divideBy2_, splitting_radius); + return finest_grid; +} + +int GMGPolar::chooseNumberOfLevels(const PolarGrid& finestGrid) { + const int minRadialNodes = 5; + const int minAngularDivisions = 4; + + // Minimum level for Multigrid + const int multigridMinLevel = 2; + + // Calculate radial maximum level + int radialNodes = finestGrid.nr(); + int radialMaxLevel = 1; + while ((radialNodes + 1) / 2 >= minRadialNodes && (radialNodes + 1) % 2 == 0) { + radialNodes = (radialNodes + 1) / 2; + radialMaxLevel++; + } + + // Calculate angular maximum level + int angularDivisions = finestGrid.ntheta(); + int angularMaxLevel = 1; + while (angularDivisions / 2 >= minAngularDivisions && angularDivisions % 2 == 0 && (angularDivisions/2) % 2 == 0) { + angularDivisions = angularDivisions / 2; + angularMaxLevel++; + } + + /* Currently unused: Number of levels which guarantee linear scalability */ + const int linear_complexity_levels = + std::ceil( (2.0 * std::log(static_cast(finestGrid.numberOfNodes())) - std::log(3.0)) / (3.0 * std::log(4.0))); + + // Determine the number of levels as the minimum of radial maximum level, angular maximum level, + // and the maximum levels specified. + int levels = std::min(radialMaxLevel, angularMaxLevel); + if(max_levels_ > 0) levels = std::min(max_levels_, levels); + + // Check if levels is less than Multigrid minimum level and throw an error + if (levels < multigridMinLevel) { + throw std::runtime_error("Number of possible levels is less than Multigrid minimum level"); + } + + return levels; +} + +void GMGPolar::resetTimings(){ + t_setup_total = 0.0; + t_setup_createLevels = 0.0; + t_setup_rhs = 0.0; + t_setup_smoother = 0.0; + t_setup_directSolver = 0.0; + + t_solve_total = 0.0; + t_solve_initial_approximation = 0.0; + t_solve_multigrid_iterations = 0.0; + t_check_convergence = 0.0; + t_check_exact_error = 0.0; + + t_avg_MGC_total = 0.0; + t_avg_MGC_preSmoothing = 0.0; + t_avg_MGC_postSmoothing = 0.0; + t_avg_MGC_residual = 0.0; + t_avg_MGC_directSolver = 0.0; +} \ No newline at end of file diff --git a/src/GMGPolar/solver.cu b/src/GMGPolar/solver.cu new file mode 100644 index 00000000..a50020d5 --- /dev/null +++ b/src/GMGPolar/solver.cu @@ -0,0 +1,421 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +#include + +void GMGPolar::solve() +{ + auto start_solve = std::chrono::high_resolution_clock::now(); + + /* ---------------------------- */ + /* Initialize starting solution */ + /* ---------------------------- */ + + auto start_initial_approximation = std::chrono::high_resolution_clock::now(); + + if(verbose_ > 0) + { + std::cout << "Cycle type: "; + if(multigrid_cycle_ == MultigridCycleType::V_CYCLE) + { + std::cout << "V." << std::endl; + }else if(multigrid_cycle_ == MultigridCycleType::W_CYCLE) + { + std::cout << "W." << std::endl; + }else if(multigrid_cycle_ == MultigridCycleType::F_CYCLE) + { + std::cout << "F." << std::endl; + } + + std::cout << "Extrapolation: "; + if (extrapolation_ == ExtrapolationType::NONE) { + std::cout << "None." << std::endl; + }else if (extrapolation_ == ExtrapolationType::IMPLICIT_EXTRAPOLATION) { + std::cout << "Implicit Extrapolation." << std::endl; + } + } + + if (!FMG_) { + int start_level_depth = 0; + Level& level = levels_[start_level_depth]; + if(level.processingType() == ProcessingType::GPU){ + assign(level.GPU_solution(), 0.0); + } else{ + assign(level.solution(), 0.0); + } + } + else { + std::cout << "Using Full Multigrid" << std::endl; + + // Start from the coarsest level + int FMG_start_level_depth = number_of_levels_ - 1; + Level& FMG_level = levels_[FMG_start_level_depth]; + assert(FMG_level.processingType() != ProcessingType::GPU); + + // Solve directly on the coarsest level + FMG_level.solution() = FMG_level.rhs(); + FMG_level.directSolveInPlace(FMG_level.solution()); // Direct solve on coarsest grid + + // Prolongate the solution from the coarsest level up to the finest, while applying Multigrid Cycles on each level + for (int current_level = FMG_start_level_depth - 1; current_level > 0; --current_level) { + Level& FMG_level = levels_[current_level]; // The current level + Level& next_FMG_level = levels_[current_level - 1]; // The finer level + + if(FMG_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(FMG_level.solution(), FMG_level.GPU_solution()); + } + if(FMG_level.processingType() != ProcessingType::CPU){ + FMGInterpolation(current_level, next_FMG_level.GPU_solution(), FMG_level.GPU_solution()); + } else{ + FMGInterpolation(current_level, next_FMG_level.solution(), FMG_level.solution()); + } + + // Apply some FMG iterations + for (int i = 0; i < FMG_iterations_; i++) { + if (current_level - 1 == 0 && (extrapolation_ != ExtrapolationType::NONE)) { + switch (FMG_cycle_) { + case MultigridCycleType::V_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_V_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_V_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + case MultigridCycleType::W_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_W_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_F_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + case MultigridCycleType::F_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_F_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_F_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + default: + std::cerr << "Error: Unknown multigrid cycle type!" << std::endl; + throw std::runtime_error("Invalid multigrid cycle type encountered."); + break; + } + } + else { + switch (FMG_cycle_) { + case MultigridCycleType::V_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + multigrid_V_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + multigrid_V_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + case MultigridCycleType::W_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + multigrid_W_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + multigrid_W_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + case MultigridCycleType::F_CYCLE: + if(next_FMG_level.processingType() == ProcessingType::GPU){ + multigrid_F_Cycle( + current_level - 1, next_FMG_level.GPU_solution(), next_FMG_level.GPU_rhs(), next_FMG_level.GPU_residual()); + } else { + multigrid_F_Cycle( + current_level - 1, next_FMG_level.solution(), next_FMG_level.rhs(), next_FMG_level.residual()); + } + break; + default: + std::cerr << "Error: Unknown multigrid cycle type!" << std::endl; + throw std::runtime_error("Invalid multigrid cycle type encountered."); + break; + } + } + } + } + } + + /* These times are included in the initial approximation and don't count towards the multigrid cyclces. */ + t_avg_MGC_total = 0.0; + t_avg_MGC_preSmoothing = 0.0; + t_avg_MGC_postSmoothing = 0.0; + t_avg_MGC_residual = 0.0; + t_avg_MGC_directSolver = 0.0; + + auto end_initial_approximation = std::chrono::high_resolution_clock::now(); + t_solve_initial_approximation += + std::chrono::duration(end_initial_approximation - start_initial_approximation).count(); + + /* ------------ */ + /* Start Solver */ + /* ------------ */ + + int start_level_depth = 0; + Level& level = levels_[start_level_depth]; + + number_of_iterations_ = 0; + + double initial_residual_norm; + double current_residual_norm, current_relative_residual_norm; + + while (number_of_iterations_ < max_iterations_) { + + if (verbose_ > 0) { + std::cout << "\n--> it: " << number_of_iterations_; + } + + /* ---------------------------------------------- */ + /* Test solution against exact solution if given. */ + /* ---------------------------------------------- */ + if (exact_solution_ != nullptr) { + auto start_check_exact_error = std::chrono::high_resolution_clock::now(); + + std::pair exact_error; + if(level.processingType() == ProcessingType::GPU){ + exact_error = computeExactError(level, level.GPU_solution(), level.GPU_residual()); + } else { + exact_error = computeExactError(level, level.solution(), level.residual()); + } + exact_errors_.push_back(exact_error); + + auto end_check_exact_error = std::chrono::high_resolution_clock::now(); + t_check_exact_error += + std::chrono::duration(end_check_exact_error - start_check_exact_error).count(); + + if (verbose_ > 0) { + std::cout << ", ||u_k-u_ex||_l2: " << exact_error.first; + std::cout << ", ||u_k-u_ex||_inf: " << exact_error.second; + } + } + + /* ---------------------------- */ + /* Compute convergence criteria */ + /* ---------------------------- */ + if (absolute_tolerance_.has_value() || relative_tolerance_.has_value()) { + auto start_check_convergence = std::chrono::high_resolution_clock::now(); + + if(level.processingType() == ProcessingType::GPU){ + level.computeResidual(level.GPU_residual(), level.GPU_rhs(), level.GPU_solution()); + } else { + level.computeResidual(level.residual(), level.rhs(), level.solution()); + } + + if (extrapolation_ != ExtrapolationType::NONE) { + Level& next_level = levels_[start_level_depth + 1]; + + if(level.processingType() == ProcessingType::GPU){ + assert(next_level.processingType() != ProcessingType::CPU); + injection(start_level_depth, next_level.GPU_solution(), level.GPU_solution()); + } else{ + assert(next_level.processingType() == ProcessingType::CPU); + injection(start_level_depth, next_level.solution(), level.solution()); + } + + if(next_level.processingType() == ProcessingType::GPU){ + next_level.computeResidual(next_level.GPU_residual(), next_level.GPU_rhs(), next_level.GPU_solution()); + } else{ + next_level.computeResidual(next_level.residual(), next_level.rhs(), next_level.solution()); + } + + if(next_level.processingType() == ProcessingType::CPU_HYBRID){ + copyHostToDevice(next_level.residual(), next_level.GPU_residual()); + } + + if(level.processingType() == ProcessingType::GPU){ + extrapolatedResidual(start_level_depth, level.GPU_residual(), next_level.GPU_residual()); + } else{ + extrapolatedResidual(start_level_depth, level.residual(), next_level.residual()); + } + } + + switch (residual_norm_type_) { + case ResidualNormType::EUCLIDEAN: + if(level.processingType() == ProcessingType::GPU){ + current_residual_norm = l2_norm(level.GPU_residual()); + } else{ + current_residual_norm = l2_norm(level.residual()); + } + break; + case ResidualNormType::WEIGHTED_EUCLIDEAN: + if(level.processingType() == ProcessingType::GPU){ + current_residual_norm = l2_norm(level.GPU_residual()) / sqrt(level.grid().numberOfNodes()); + } else{ + current_residual_norm = l2_norm(level.GPU_residual()) / sqrt(level.grid().numberOfNodes()); + } + break; + case ResidualNormType::INFINITY_NORM: + if(level.processingType() == ProcessingType::GPU){ + current_residual_norm = infinity_norm(level.GPU_residual()); + } else{ + current_residual_norm = infinity_norm(level.residual()); + } + break; + default: + throw std::invalid_argument("Unknown ResidualNormType"); + } + residual_norms_.push_back(current_residual_norm); + + if (number_of_iterations_ == 0) { + initial_residual_norm = current_residual_norm; + current_relative_residual_norm = 1.0; + if (verbose_ > 0) { + std::cout << ", ||r_k||: " << current_residual_norm; + } + } + else { + current_relative_residual_norm = current_residual_norm / initial_residual_norm; + const double current_residual_reduction_factor = + residual_norms_[number_of_iterations_] / residual_norms_[number_of_iterations_ - 1]; + + if (verbose_ > 0) { + std::cout << ", ||r_k||: " << current_residual_norm; + std::cout << ", ||r_k|| / ||r_0||: " << current_relative_residual_norm; + std::cout << ", ||r_k|| / ||r_{k-1}||: " << current_residual_reduction_factor; + } + + const double convergence_factor = 0.7; + if (current_residual_reduction_factor > convergence_factor && + extrapolation_ == ExtrapolationType::COMBINED && full_grid_smoothing_) { + full_grid_smoothing_ = false; + std::cout << "Switching from full grid smoothing to standard extrapolated smoothing." << std::endl; + } + } + + auto end_check_convergence = std::chrono::high_resolution_clock::now(); + t_check_convergence += + std::chrono::duration(end_check_convergence - start_check_convergence).count(); + + if (converged(current_residual_norm, current_relative_residual_norm)) + break; + } + + /* ------------------------- */ + /* Start Multigrid Iteration */ + /* ------------------------- */ + auto start_solve_multigrid_iterations = std::chrono::high_resolution_clock::now(); + + switch (multigrid_cycle_) { + case MultigridCycleType::V_CYCLE: + if (extrapolation_ == ExtrapolationType::NONE) { + if(level.processingType() == ProcessingType::GPU){ + multigrid_V_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + multigrid_V_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + else { + if(level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_V_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_V_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + break; + case MultigridCycleType::W_CYCLE: + if (extrapolation_ == ExtrapolationType::NONE) { + if(level.processingType() == ProcessingType::GPU){ + multigrid_W_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + multigrid_W_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + else { + if(level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_W_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_W_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + break; + case MultigridCycleType::F_CYCLE: + if (extrapolation_ == ExtrapolationType::NONE) { + if(level.processingType() == ProcessingType::GPU){ + multigrid_F_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + multigrid_F_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + else { + if(level.processingType() == ProcessingType::GPU){ + implicitlyExtrapolatedMultigrid_F_Cycle( + start_level_depth, level.GPU_solution(), level.GPU_rhs(), level.GPU_residual()); + } else { + implicitlyExtrapolatedMultigrid_F_Cycle( + start_level_depth, level.solution(), level.rhs(), level.residual()); + } + } + break; + default: + throw std::invalid_argument("Unknown MultigridCycleType"); + } + number_of_iterations_++; + + auto end_solve_multigrid_iterations = std::chrono::high_resolution_clock::now(); + t_solve_multigrid_iterations += + std::chrono::duration(end_solve_multigrid_iterations - start_solve_multigrid_iterations).count(); + } + + if (number_of_iterations_ > 0) { + /* --------------------------------------------- */ + /* Compute the average Multigrid Iteration times */ + /* --------------------------------------------- */ + t_avg_MGC_total = t_solve_multigrid_iterations / number_of_iterations_; + t_avg_MGC_preSmoothing /= number_of_iterations_; + t_avg_MGC_postSmoothing /= number_of_iterations_; + t_avg_MGC_residual /= number_of_iterations_; + t_avg_MGC_directSolver /= number_of_iterations_; + + /* -------------------------------- */ + /* Compute the reduction factor rho */ + /* -------------------------------- */ + mean_residual_reduction_factor_ = + std::pow(current_residual_norm / initial_residual_norm, 1.0 / number_of_iterations_); + + if (verbose_ > 0) { + std::cout << "\nTotal Iterations: " << number_of_iterations_ << std::endl; + std::cout << "Mean Residual Reduction Factor Rho: " << mean_residual_reduction_factor_ << std::endl; + } + } + + auto end_solve = std::chrono::high_resolution_clock::now(); + t_solve_total += std::chrono::duration(end_solve - start_solve).count(); + t_solve_total -= t_check_exact_error; +} + +bool GMGPolar::converged(const double& residual_norm, const double& relative_residual_norm) +{ + if (relative_tolerance_.has_value()) { + if (!(relative_residual_norm > relative_tolerance_.value())) { + return true; + } + } + if (absolute_tolerance_.has_value()) { + if (!(residual_norm > absolute_tolerance_.value())) { + return true; + } + } + return false; +} diff --git a/src/GMGPolar/writeToVTK.cpp b/src/GMGPolar/writeToVTK.cpp new file mode 100644 index 00000000..9020232d --- /dev/null +++ b/src/GMGPolar/writeToVTK.cpp @@ -0,0 +1,69 @@ +#include "../../include/GMGPolar/gmgpolar.h" + +#include + +void GMGPolar::writeToVTK(const std::filesystem::path& file_path, const PolarGrid& grid) +{ + const auto filename = file_path.stem().string() + ".vtu"; + + std::ofstream file(file_path.parent_path() / filename); + if (!file.is_open()) + { + throw std::runtime_error("Failed to open file '" + (file_path.parent_path() / filename).string() + "'"); + } + + file << "\n" + << "\n" + << "\n" + << "\n"; + + // Write points + file << "\n" + << "\n"; + int i_r, i_theta; + double r, theta; + for (int index = 0; index < grid.numberOfNodes(); index++) + { + grid.multiIndex(index, i_r, i_theta); + r = grid.radius(i_r); + theta = grid.theta(i_theta); + double sin_theta = std::sin(theta); + double cos_theta = std::cos(theta); + file << domain_geometry_->Fx(r, theta, sin_theta, cos_theta) << " " << domain_geometry_->Fy(r, theta, sin_theta, cos_theta) << " " << 0 + << "\n"; + } + file << "\n" + << "\n"; + + // Write cells + file << "\n"; + file << "\n"; + for (int i_r = 0; i_r < grid.nr() - 1; i_r++) + { + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) + { + file << grid.index(i_r, i_theta) << " " << grid.index(i_r + 1, i_theta) << " " << grid.index(i_r + 1, i_theta + 1) << " " + << grid.index(i_r, i_theta + 1) << "\n"; + } + } + file << "\n"; + + file << "\n"; + for (int i = 0; i < (grid.nr() - 1) * grid.ntheta(); i++) + { + file << 4 * (i + 1) << " "; + } + file << "\n"; + + file << "\n"; + for (int i = 0; i < (grid.nr() - 1) * grid.ntheta(); i++) + { + file << "9 "; // VTK_QUAD + } + file << "\n"; + + file << "\n" + << "\n" + << "\n" + << "\n"; +} diff --git a/src/InputFunctions/boundaryConditions.cpp b/src/InputFunctions/boundaryConditions.cpp new file mode 100644 index 00000000..3e7d60f8 --- /dev/null +++ b/src/InputFunctions/boundaryConditions.cpp @@ -0,0 +1,28 @@ +#include "../../include/InputFunctions/boundaryConditions.h" + +#ifdef GEOM_SHAFRANOV +BoundaryConditions::BoundaryConditions() +{ +} + +BoundaryConditions::BoundaryConditions(const double& Rmax, const double& elongation_kappa, const double& shift_delta) + : Rmax(Rmax), elongation_kappa(elongation_kappa), shift_delta(shift_delta) +{ +} +#else +BoundaryConditions::BoundaryConditions() +{ + initializeGeometry(); +} + + +BoundaryConditions::BoundaryConditions(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e) + : Rmax(Rmax), inverse_aspect_ratio_epsilon(inverse_aspect_ratio_epsilon), ellipticity_e(ellipticity_e) { + initializeGeometry(); +} + +void BoundaryConditions::initializeGeometry() { + assert(inverse_aspect_ratio_epsilon < 2.0); // Ensure epsilon is in a valid range + factor_xi = 1.0 / sqrt(1.0 - inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon / 4.0); +} +#endif diff --git a/src/InputFunctions/densityProfileCoefficients.cpp b/src/InputFunctions/densityProfileCoefficients.cpp new file mode 100644 index 00000000..457423a0 --- /dev/null +++ b/src/InputFunctions/densityProfileCoefficients.cpp @@ -0,0 +1,10 @@ +#include "../../include/InputFunctions/densityProfileCoefficients.h" + +DensityProfileCoefficients::DensityProfileCoefficients(const double& Rmax, const double& alpha_jump) : + Rmax(Rmax), + alpha_jump(alpha_jump) +{} + +double DensityProfileCoefficients::getAlphaJump() const { + return alpha_jump; +} \ No newline at end of file diff --git a/src/InputFunctions/domainGeometry.cpp b/src/InputFunctions/domainGeometry.cpp new file mode 100644 index 00000000..cd66e9f8 --- /dev/null +++ b/src/InputFunctions/domainGeometry.cpp @@ -0,0 +1,29 @@ +#include "../../include/InputFunctions/domainGeometry.h" + +#ifdef GEOM_SHAFRANOV +DomainGeometry::DomainGeometry() +{ +} + +DomainGeometry::DomainGeometry(const double& Rmax, const double& elongation_kappa, const double& shift_delta) + : Rmax(Rmax), elongation_kappa(elongation_kappa), shift_delta(shift_delta) +{ +} +#else +DomainGeometry::DomainGeometry() +{ + initializeGeometry(); +} + +DomainGeometry::DomainGeometry(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e) + : Rmax(Rmax), inverse_aspect_ratio_epsilon(inverse_aspect_ratio_epsilon), ellipticity_e(ellipticity_e) { + initializeGeometry(); +} + +void DomainGeometry::initializeGeometry() { + assert(inverse_aspect_ratio_epsilon < 2.0); // Ensure the epsilon is in a valid range + factor_xi = 1.0 / sqrt(1.0 - inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon / 4.0); +} +#endif + + diff --git a/src/InputFunctions/exactSolution.cpp b/src/InputFunctions/exactSolution.cpp new file mode 100644 index 00000000..c20654de --- /dev/null +++ b/src/InputFunctions/exactSolution.cpp @@ -0,0 +1,29 @@ +#include "../../include/InputFunctions/exactSolution.h" + + + +#ifdef GEOM_SHAFRANOV +ExactSolution::ExactSolution() +{ +} + +ExactSolution::ExactSolution(const double& Rmax, const double& elongation_kappa, const double& shift_delta) + : Rmax(Rmax), elongation_kappa(elongation_kappa), shift_delta(shift_delta) +{ +} +#else +ExactSolution::ExactSolution() +{ + initializeGeometry(); +} + +ExactSolution::ExactSolution(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e) + : Rmax(Rmax), inverse_aspect_ratio_epsilon(inverse_aspect_ratio_epsilon), ellipticity_e(ellipticity_e) { + initializeGeometry(); +} + +void ExactSolution::initializeGeometry() { + assert(inverse_aspect_ratio_epsilon < 2.0); // Ensure epsilon is in a valid range + factor_xi = 1.0 / sqrt(1.0 - inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon / 4.0); +} +#endif diff --git a/src/InputFunctions/sourceTerm.cpp b/src/InputFunctions/sourceTerm.cpp new file mode 100644 index 00000000..d04e359a --- /dev/null +++ b/src/InputFunctions/sourceTerm.cpp @@ -0,0 +1,28 @@ +#include "../../include/InputFunctions/sourceTerm.h" + + +#ifdef GEOM_SHAFRANOV +SourceTerm::SourceTerm() +{ +} + +SourceTerm::SourceTerm(const double& Rmax, const double& elongation_kappa, const double& shift_delta) +: Rmax(Rmax), elongation_kappa(elongation_kappa), shift_delta(shift_delta) +{ +} +#else +SourceTerm::SourceTerm() +{ + initializeGeometry(); +} + +SourceTerm::SourceTerm(const double& Rmax, const double& inverse_aspect_ratio_epsilon, const double& ellipticity_e) + : Rmax(Rmax), inverse_aspect_ratio_epsilon(inverse_aspect_ratio_epsilon), ellipticity_e(ellipticity_e) { + initializeGeometry(); +} + +void SourceTerm::initializeGeometry(){ + assert(inverse_aspect_ratio_epsilon < 2.0); // Ensure epsilon is in a valid range + factor_xi = 1.0 / sqrt(1.0 - inverse_aspect_ratio_epsilon * inverse_aspect_ratio_epsilon / 4.0); +} +#endif \ No newline at end of file diff --git a/src/Interpolation/extrapolated_prolongation.cpp b/src/Interpolation/extrapolated_prolongation.cpp new file mode 100644 index 00000000..4d4b6a1e --- /dev/null +++ b/src/Interpolation/extrapolated_prolongation.cpp @@ -0,0 +1,80 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +#define FINE_NODE_EXTRAPOLATED_PROLONGATION() \ +do { \ + if(i_r & 1) { \ + if(i_theta & 1) { \ + /* i_r % 2 == 1, i_theta % 2 == 1 */ \ + /* Fine node in the center of four coarse nodes */ \ + result[fineGrid.index(i_r, i_theta)] = 0.5 * ( \ + x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] + /* Bottom right */ \ + x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] /* Top left */ \ + ); \ + } \ + else { \ + /* i_r % 2 == 1, i_theta % 2 == 0 */ \ + /* Fine node between coarse nodes in radial direction */ \ + result[fineGrid.index(i_r, i_theta)] = 0.5 * ( \ + x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* left */ \ + x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] /* right */ \ + ); \ + } \ + } \ + else { \ + if(i_theta & 1) { \ + /* i_r % 2 == 0, i_theta % 2 == 1 */ \ + /* Fine node between coarse nodes in theta direction */ \ + result[fineGrid.index(i_r, i_theta)] = 0.5 * ( \ + x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* bottom */ \ + x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] /* top */ \ + ); \ + } \ + else { \ + /* i_r % 2 == 0, i_theta % 2 == 0 */ \ + /* Fine node appears in coarse grid */ \ + result[fineGrid.index(i_r, i_theta)] = x[coarseGrid.index(i_r_coarse, i_theta_coarse)]; /* center */ \ + } \ + } \ +} while(0) + +void Interpolation::applyExtrapolatedProlongation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarseGrid = fromLevel.grid(); + const PolarGrid& fineGrid = toLevel.grid(); + + assert(x.size() == coarseGrid.numberOfNodes()); + assert(result.size() == fineGrid.numberOfNodes()); + + #pragma omp parallel if (fineGrid.numberOfNodes() > 10'000) + { + /* Circluar Indexing Section */ + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r = 0; i_r < fineGrid.numberSmootherCircles(); i_r++) + { + int i_r_coarse = i_r >> 1; + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + FINE_NODE_EXTRAPOLATED_PROLONGATION(); + } + } + + /* Radial Indexing Section */ + /* For loop matches radial access pattern */ + #pragma omp for nowait + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + for (int i_r = fineGrid.numberSmootherCircles(); i_r < fineGrid.nr(); i_r++) + { + int i_r_coarse = i_r >> 1; + FINE_NODE_EXTRAPOLATED_PROLONGATION(); + } + } + } +} diff --git a/src/Interpolation/extrapolated_prolongation.cu b/src/Interpolation/extrapolated_prolongation.cu new file mode 100644 index 00000000..97e4cd93 --- /dev/null +++ b/src/Interpolation/extrapolated_prolongation.cu @@ -0,0 +1,57 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyExtrapolatedProlongation_kernel(PolarGrid* fine_grid, double* result, PolarGrid* coarse_grid, double* x) { + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= fine_grid->nr() || i_theta >= fine_grid->ntheta()) return; + + int i_r_coarse = i_r >> 1; + int i_theta_coarse = i_theta >> 1; + + double value; + double multiplier; + + if (i_r & 1) { // i_r is odd + if (i_theta & 1) { // i_theta is odd + value = x[coarse_grid->index(i_r_coarse+1, i_theta_coarse)] + x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)]; + multiplier = 0.5; + } else { // i_theta is even + value = x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + x[coarse_grid->index(i_r_coarse+1, i_theta_coarse)]; + multiplier = 0.5; + } + } else { // i_r is even + if (i_theta & 1) { // i_theta is odd + value = x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)]; + multiplier = 0.5; + } else { // i_theta is even + value = x[coarse_grid->index(i_r_coarse, i_theta_coarse)]; + multiplier = 1.0; + } + } + + result[fine_grid->index(i_r, i_theta)] = multiplier * value; +} + +/* Remark: This injection is not scaled. */ +void Interpolation::applyExtrapolatedProlongation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarse_grid = fromLevel.grid(); + const PolarGrid& fine_grid = toLevel.grid(); + + assert(x.size() == coarse_grid.numberOfNodes()); + assert(result.size() == fine_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((fine_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (fine_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyExtrapolatedProlongation_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Interpolation/extrapolated_restriction.cpp b/src/Interpolation/extrapolated_restriction.cpp new file mode 100644 index 00000000..12f4d74a --- /dev/null +++ b/src/Interpolation/extrapolated_restriction.cpp @@ -0,0 +1,114 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +/* For the restriction we use R_ex = P_ex^T */ + +void Interpolation::applyExtrapolatedRestriction(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const{ + assert(toLevel.level() == fromLevel.level() + 1); + const PolarGrid& fineGrid = fromLevel.grid(); + const PolarGrid& coarseGrid = toLevel.grid(); + + assert(x.size() == fineGrid.numberOfNodes()); + assert(result.size() == coarseGrid.numberOfNodes()); + + const int coarseNumberSmootherCircles = coarseGrid.numberSmootherCircles(); + + #pragma omp parallel if(fineGrid.numberOfNodes() > 10'000) + { + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r_coarse = 0; i_r_coarse < coarseNumberSmootherCircles; i_r_coarse++){ + int i_r = i_r_coarse << 1; + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++){ + int i_theta = i_theta_coarse << 1; + + if(0 < i_r_coarse && i_r_coarse < coarseNumberSmootherCircles-1){ + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = + // Center + x[fineGrid.index(i_r,i_theta)] + + // Left, Right, Bottom, Top + 0.5 * x[fineGrid.index(i_r-1, i_theta)] + + 0.5 * x[fineGrid.index(i_r+1, i_theta)] + + 0.5 * x[fineGrid.index(i_r, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r, i_theta_P1)] + + // Bottom Right, Top Left + 0.5 * x[fineGrid.index(i_r+1, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r-1, i_theta_P1)]; + } else{ + /* First and Last Circle have to be checked for domain boundary */ + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + // Center, Bottom, Top + double value = x[fineGrid.index(i_r,i_theta)] + + 0.5 * x[fineGrid.index(i_r, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r, i_theta_P1)]; + + if(i_r_coarse > 0){ + // Left, Top Left + value += + 0.5 * x[fineGrid.index(i_r-1, i_theta)] + + 0.5 * x[fineGrid.index(i_r-1, i_theta_P1)]; + } + if(i_r_coarse < coarseGrid.nr() - 1){ + // Right, Bottom Right + value += + 0.5 * x[fineGrid.index(i_r+1, i_theta)] + + 0.5 * x[fineGrid.index(i_r+1, i_theta_M1)]; + } + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = value; + } + } + } + + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++){ + int i_theta = i_theta_coarse << 1; + for (int i_r_coarse = coarseNumberSmootherCircles; i_r_coarse < coarseGrid.nr(); i_r_coarse++){ + int i_r = i_r_coarse << 1; + + if(coarseGrid.numberSmootherCircles() < i_r_coarse && i_r_coarse < coarseGrid.nr()-1){ + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = + // Center + x[fineGrid.index(i_r,i_theta)] + + // Left, Right, Bottom, Top + 0.5 * x[fineGrid.index(i_r-1, i_theta)] + + 0.5 * x[fineGrid.index(i_r+1, i_theta)] + + 0.5 * x[fineGrid.index(i_r, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r, i_theta_P1)] + + // Bottom Right, Top Left + 0.5 * x[fineGrid.index(i_r+1, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r-1, i_theta_P1)]; + } else{ + /* First and Last radial nodes have to be checked for domain boundary */ + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + // Center, Bottom, Top + double value = x[fineGrid.index(i_r,i_theta)] + + 0.5 * x[fineGrid.index(i_r, i_theta_M1)] + + 0.5 * x[fineGrid.index(i_r, i_theta_P1)]; + if(i_r_coarse > 0){ + // Left, Top Left + value += + 0.5 * x[fineGrid.index(i_r-1, i_theta)] + + 0.5 * x[fineGrid.index(i_r-1, i_theta_P1)]; + } + if(i_r_coarse < coarseGrid.nr() - 1){ + // Right, Bottom Right + value += + 0.5 * x[fineGrid.index(i_r+1, i_theta)] + + 0.5 * x[fineGrid.index(i_r+1, i_theta_M1)]; + } + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = value; + } + } + } + } +} diff --git a/src/Interpolation/extrapolated_restriction.cu b/src/Interpolation/extrapolated_restriction.cu new file mode 100644 index 00000000..db597f66 --- /dev/null +++ b/src/Interpolation/extrapolated_restriction.cu @@ -0,0 +1,56 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyExtrapolatedRestriction_kernel(PolarGrid* coarse_grid, double* result, PolarGrid* fine_grid, double* x) { + int i_r_coarse = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta_coarse = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r_coarse < coarse_grid->nr() && i_theta_coarse < coarse_grid->ntheta()) { + int i_r = i_r_coarse << 1; + int i_theta = i_theta_coarse << 1; + + int i_theta_M1 = fine_grid->wrapThetaIndex(i_theta-1); + int i_theta_P1 = fine_grid->wrapThetaIndex(i_theta+1); + + // Center, Bottom, Top + double value = x[fine_grid->index(i_r,i_theta)] + + 0.5 * x[fine_grid->index(i_r, i_theta_M1)] + + 0.5 * x[fine_grid->index(i_r, i_theta_P1)]; + + if(i_r_coarse > 0){ + // Left Part + // Left, Top Left + value += + 0.5 * x[fine_grid->index(i_r-1, i_theta)] + + 0.5 * x[fine_grid->index(i_r-1, i_theta_P1)]; + } + if(i_r_coarse < coarse_grid->nr() - 1){ + // Right Part + // Right, Bottom Right + value += + 0.5 * x[fine_grid->index(i_r+1, i_theta)] + + 0.5 * x[fine_grid->index(i_r+1, i_theta_M1)]; + } + result[coarse_grid->index(i_r_coarse,i_theta_coarse)] = value; + } +} + +void Interpolation::applyExtrapolatedRestriction(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const{ + assert(toLevel.level() == fromLevel.level() + 1); + + const PolarGrid& fine_grid = fromLevel.grid(); + const PolarGrid& coarse_grid = toLevel.grid(); + + assert(x.size() == fine_grid.numberOfNodes()); + assert(result.size() == coarse_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((coarse_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (coarse_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyExtrapolatedRestriction_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} diff --git a/src/Interpolation/fmg_interpolation.cpp b/src/Interpolation/fmg_interpolation.cpp new file mode 100644 index 00000000..e178eb85 --- /dev/null +++ b/src/Interpolation/fmg_interpolation.cpp @@ -0,0 +1,218 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +// /* Bicubic FMG interpolator 1/16 * [-1, 9, 9, -1] */ based on +// Lagrange interpolation (4 interpolation points, 1 interpolated value) + +// clang-format off +#define FINE_NODE_FMG_INTERPOLATION() \ +do { \ + /* Case 1: On the boundary */ \ + if(i_r == 0 || i_r == fineGrid.nr() - 1){ \ + if(i_theta & 1){ \ + double k0 = coarseGrid.angularSpacing(i_theta_coarse-1); \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + double k3 = coarseGrid.angularSpacing(i_theta_coarse+1); \ + \ + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); \ + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); \ + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; \ + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; \ + \ + result[fineGrid.index(i_r, i_theta)] = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse, i_theta_coarse-1)] + /* (0, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse )] + /* (0, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] + /* (0, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+2)] /* (0, +3) */ \ + ); \ + } \ + else{ \ + result[fineGrid.index(i_r, i_theta)] = \ + x[coarseGrid.index(i_r_coarse, i_theta_coarse)]; /* center */ \ + } \ + } \ + /* Case 2: Next to the boundary */ \ + else if(i_r == 1 || i_r == fineGrid.nr() - 2){ \ + if(i_theta & 1){ \ + double k0 = coarseGrid.angularSpacing(i_theta_coarse-1); \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + double k3 = coarseGrid.angularSpacing(i_theta_coarse+1); \ + \ + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); \ + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); \ + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; \ + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; \ + \ + double left_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse, i_theta_coarse-1)] + /* (-1, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse )] + /* (-1, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] + /* (-1, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+2)] /* (-1, +3) */ \ + ); \ + double right_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse-1)] + /* (+1, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse )] + /* (+1, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse+1)] + /* (+1, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse+2)] /* (+1, +3) */ \ + ); \ + \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + result[fineGrid.index(i_r, i_theta)] = (h1 * left_value + h2 * right_value) / (h1 + h2); \ + } \ + else{ \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + result[fineGrid.index(i_r, i_theta)] = ( \ + h1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* left */ \ + h2 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] /* right */ \ + ) / (h1 + h2); \ + } \ + } \ + else{ \ + /* Case 3: In the interior */ \ + if(i_r & 1){ \ + if(i_theta & 1){ \ + double k0 = coarseGrid.angularSpacing(i_theta_coarse-1); \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + double k3 = coarseGrid.angularSpacing(i_theta_coarse+1); \ + \ + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); \ + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); \ + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; \ + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; \ + \ + double outer_left_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse-1, i_theta_coarse-1)] + /* (-3, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse-1, i_theta_coarse )] + /* (-3, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse-1, i_theta_coarse+1)] + /* (-3, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse-1, i_theta_coarse+2)] /* (-3, +3) */ \ + ); \ + double inner_left_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse, i_theta_coarse-1)] + /* (-1, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse )] + /* (-1, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] + /* (-1, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+2)] /* (-1, +3) */ \ + ); \ + double inner_right_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse-1)] + /* (+1, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse )] + /* (+1, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse+1)] + /* (+1, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse+2)] /* (+1, +3) */ \ + ); \ + double outer_right_value = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse+2, i_theta_coarse-1)] + /* (+3, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse+2, i_theta_coarse )] + /* (+3, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse+2, i_theta_coarse+1)] + /* (+3, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse+2, i_theta_coarse+2)] /* (+3, +3) */ \ + ); \ + \ + double h0 = coarseGrid.radialSpacing(i_r_coarse-1); \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + double h3 = coarseGrid.radialSpacing(i_r_coarse+1); \ + \ + double w_r0 = - h1/h0 * h2/(h0+h1+h2) * (h2+h3)/(h0+h1+h2+h3); \ + double w_r1 = (h0+h1)/h0 * h2/(h1+h2) * (h2+h3)/(h1+h2+h3); \ + double w_r2 = (h0+h1)/(h0+h1+h2) * h1/(h1+h2) * (h2+h3)/h3; \ + double w_r3 = - (h0+h1)/(h0+h1+h2+h3) * h1/(h1+h2+h3) * h2/h3; \ + \ + result[fineGrid.index(i_r, i_theta)] = ( \ + w_r0 * outer_left_value + \ + w_r1 * inner_left_value + \ + w_r2 * inner_right_value + \ + w_r3 * outer_right_value \ + ); \ + } \ + else{ \ + double h0 = coarseGrid.radialSpacing(i_r_coarse-1); \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + double h3 = coarseGrid.radialSpacing(i_r_coarse+1); \ + \ + double w_r0 = - h1/h0 * h2/(h0+h1+h2) * (h2+h3)/(h0+h1+h2+h3); \ + double w_r1 = (h0+h1)/h0 * h2/(h1+h2) * (h2+h3)/(h1+h2+h3); \ + double w_r2 = (h0+h1)/(h0+h1+h2) * h1/(h1+h2) * (h2+h3)/h3; \ + double w_r3 = - (h0+h1)/(h0+h1+h2+h3) * h1/(h1+h2+h3) * h2/h3; \ + \ + result[fineGrid.index(i_r, i_theta)] = ( \ + w_r0 * x[coarseGrid.index(i_r_coarse-1, i_theta_coarse)] + /* (-3, 0) */ \ + w_r1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse )] + /* (-1, 0) */ \ + w_r2 * x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] + /* (+1, 0) */ \ + w_r3 * x[coarseGrid.index(i_r_coarse+2, i_theta_coarse)] /* (+3, 0) */ \ + ); \ + } \ + } \ + else{ \ + if(i_theta & 1){ \ + double k0 = coarseGrid.angularSpacing(i_theta_coarse-1); \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + double k3 = coarseGrid.angularSpacing(i_theta_coarse+1); \ + \ + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); \ + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); \ + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; \ + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; \ + \ + result[fineGrid.index(i_r, i_theta)] = ( \ + w_theta0 * x[coarseGrid.index(i_r_coarse, i_theta_coarse-1)] + /* (0, -3) */ \ + w_theta1 * x[coarseGrid.index(i_r_coarse, i_theta_coarse )] + /* (0, -1) */ \ + w_theta2 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+1)] + /* (0, +1) */ \ + w_theta3 * x[coarseGrid.index(i_r_coarse, i_theta_coarse+2)] /* (0, +3) */ \ + ); \ + } \ + else{ \ + result[fineGrid.index(i_r, i_theta)] = x[coarseGrid.index(i_r_coarse, i_theta_coarse)]; /* center */ \ + } \ + } \ + } \ +} while(0) +// clang-format on + + +// clang-format off +void Interpolation::applyFMGInterpolation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarseGrid = fromLevel.grid(); + const PolarGrid& fineGrid = toLevel.grid(); + + assert(x.size() == coarseGrid.numberOfNodes()); + assert(result.size() == fineGrid.numberOfNodes()); + + #pragma omp parallel if (fineGrid.numberOfNodes() > 10'000) + { + /* Circluar Indexing Section */ + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r = 0; i_r < fineGrid.numberSmootherCircles(); i_r++) + { + int i_r_coarse = i_r >> 1; + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + FINE_NODE_FMG_INTERPOLATION(); + } + } + + /* Radial Indexing Section */ + /* For loop matches radial access pattern */ + #pragma omp for nowait + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + for (int i_r = fineGrid.numberSmootherCircles(); i_r < fineGrid.nr(); i_r++) + { + int i_r_coarse = i_r >> 1; + FINE_NODE_FMG_INTERPOLATION(); + } + } + } +} +// clang-format on \ No newline at end of file diff --git a/src/Interpolation/fmg_interpolation.cu b/src/Interpolation/fmg_interpolation.cu new file mode 100644 index 00000000..94d72913 --- /dev/null +++ b/src/Interpolation/fmg_interpolation.cu @@ -0,0 +1,199 @@ + +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyFMG_Interpolation_kernel(PolarGrid* fine_grid, double* result, PolarGrid* coarse_grid, double* x) { + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= fine_grid->nr() || i_theta >= fine_grid->ntheta()) return; + + int i_r_coarse = i_r >> 1; + int i_theta_coarse = i_theta >> 1; + + /* Case 1: On the boundary */ + if(i_r == 0 || i_r == fine_grid->nr() - 1){ + if(i_theta & 1){ + double k0 = coarse_grid->angularSpacing(i_theta_coarse-1); + double k1 = fine_grid->angularSpacing(i_theta-1); + double k2 = fine_grid->angularSpacing(i_theta); + double k3 = coarse_grid->angularSpacing(i_theta_coarse+1); + + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; + + result[fine_grid->index(i_r, i_theta)] = ( + w_theta0 * x[coarse_grid->index(i_r_coarse, i_theta_coarse-1)] + /* (0, -3) */ \ + w_theta1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse )] + /* (0, -1) */ \ + w_theta2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)] + /* (0, +1) */ \ + w_theta3 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+2)] /* (0, +3) */ \ + ); + } + else{ + result[fine_grid->index(i_r, i_theta)] = + x[coarse_grid->index(i_r_coarse, i_theta_coarse)]; /* center */ + } + } + /* Case 2: Next to the boundary */ + else if(i_r == 1 || i_r == fine_grid->nr() - 2){ + if(i_theta & 1){ + double k0 = coarse_grid->angularSpacing(i_theta_coarse-1); + double k1 = fine_grid->angularSpacing(i_theta-1); + double k2 = fine_grid->angularSpacing(i_theta); + double k3 = coarse_grid->angularSpacing(i_theta_coarse+1); + + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; + + double left_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse, i_theta_coarse-1)] + /* (-1, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse )] + /* (-1, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)] + /* (-1, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+2)] /* (-1, +3) */ + ); + double right_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse-1)] + /* (+1, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse )] + /* (+1, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse+1)] + /* (+1, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse+2)] /* (+1, +3) */ + ); + + double h1 = fine_grid->radialSpacing(i_r-1); + double h2 = fine_grid->radialSpacing(i_r); + result[fine_grid->index(i_r, i_theta)] = (h1 * left_value + h2 * right_value) / (h1 + h2); + } + else{ + double h1 = fine_grid->radialSpacing(i_r-1); + double h2 = fine_grid->radialSpacing(i_r); + result[fine_grid->index(i_r, i_theta)] = ( + h1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + /* left */ + h2 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse)] /* right */ + ) / (h1 + h2); + } + } + else{ + /* Case 3: In the interior */ + if(i_r & 1){ + if(i_theta & 1){ + double k0 = coarse_grid->angularSpacing(i_theta_coarse-1); + double k1 = fine_grid->angularSpacing(i_theta-1); + double k2 = fine_grid->angularSpacing(i_theta); + double k3 = coarse_grid->angularSpacing(i_theta_coarse+1); + + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; + + double outer_left_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse-1, i_theta_coarse-1)] + /* (-3, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse-1, i_theta_coarse )] + /* (-3, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse-1, i_theta_coarse+1)] + /* (-3, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse-1, i_theta_coarse+2)] /* (-3, +3) */ + ); + double inner_left_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse, i_theta_coarse-1)] + /* (-1, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse )] + /* (-1, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)] + /* (-1, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+2)] /* (-1, +3) */ + ); + double inner_right_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse-1)] + /* (+1, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse )] + /* (+1, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse+1)] + /* (+1, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse+2)] /* (+1, +3) */ + ); + double outer_right_value = ( + w_theta0 * x[coarse_grid->index(i_r_coarse+2, i_theta_coarse-1)] + /* (+3, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse+2, i_theta_coarse )] + /* (+3, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse+2, i_theta_coarse+1)] + /* (+3, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse+2, i_theta_coarse+2)] /* (+3, +3) */ + ); + + double h0 = coarse_grid->radialSpacing(i_r_coarse-1); + double h1 = fine_grid->radialSpacing(i_r-1); + double h2 = fine_grid->radialSpacing(i_r); + double h3 = coarse_grid->radialSpacing(i_r_coarse+1); + + double w_r0 = - h1/h0 * h2/(h0+h1+h2) * (h2+h3)/(h0+h1+h2+h3); + double w_r1 = (h0+h1)/h0 * h2/(h1+h2) * (h2+h3)/(h1+h2+h3); + double w_r2 = (h0+h1)/(h0+h1+h2) * h1/(h1+h2) * (h2+h3)/h3; + double w_r3 = - (h0+h1)/(h0+h1+h2+h3) * h1/(h1+h2+h3) * h2/h3; + + result[fine_grid->index(i_r, i_theta)] = ( + w_r0 * outer_left_value + + w_r1 * inner_left_value + + w_r2 * inner_right_value + + w_r3 * outer_right_value + ); + } + else{ + double h0 = coarse_grid->radialSpacing(i_r_coarse-1); + double h1 = fine_grid->radialSpacing(i_r-1); + double h2 = fine_grid->radialSpacing(i_r); + double h3 = coarse_grid->radialSpacing(i_r_coarse+1); + + double w_r0 = - h1/h0 * h2/(h0+h1+h2) * (h2+h3)/(h0+h1+h2+h3); + double w_r1 = (h0+h1)/h0 * h2/(h1+h2) * (h2+h3)/(h1+h2+h3); + double w_r2 = (h0+h1)/(h0+h1+h2) * h1/(h1+h2) * (h2+h3)/h3; + double w_r3 = - (h0+h1)/(h0+h1+h2+h3) * h1/(h1+h2+h3) * h2/h3; + + result[fine_grid->index(i_r, i_theta)] = ( + w_r0 * x[coarse_grid->index(i_r_coarse-1, i_theta_coarse)] + /* (-3, 0) */ + w_r1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse )] + /* (-1, 0) */ + w_r2 * x[coarse_grid->index(i_r_coarse+1, i_theta_coarse)] + /* (+1, 0) */ + w_r3 * x[coarse_grid->index(i_r_coarse+2, i_theta_coarse)] /* (+3, 0) */ + ); + } + } + else{ + if(i_theta & 1){ + double k0 = coarse_grid->angularSpacing(i_theta_coarse-1); + double k1 = fine_grid->angularSpacing(i_theta-1); + double k2 = fine_grid->angularSpacing(i_theta); + double k3 = coarse_grid->angularSpacing(i_theta_coarse+1); + + double w_theta0 = - k1/k0 * k2/(k0+k1+k2) * (k2+k3)/(k0+k1+k2+k3); + double w_theta1 = (k0+k1)/k0 * k2/(k1+k2) * (k2+k3)/(k1+k2+k3); + double w_theta2 = (k0+k1)/(k0+k1+k2) * k1/(k1+k2) * (k2+k3)/k3; + double w_theta3 = - (k0+k1)/(k0+k1+k2+k3) * k1/(k1+k2+k3) * k2/k3; + + result[fine_grid->index(i_r, i_theta)] = ( + w_theta0 * x[coarse_grid->index(i_r_coarse, i_theta_coarse-1)] + /* (0, -3) */ + w_theta1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse )] + /* (0, -1) */ + w_theta2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+1)] + /* (0, +1) */ + w_theta3 * x[coarse_grid->index(i_r_coarse, i_theta_coarse+2)] /* (0, +3) */ + ); + } + else{ + result[fine_grid->index(i_r, i_theta)] = x[coarse_grid->index(i_r_coarse, i_theta_coarse)]; /* center */ + } + } + } +} + +/* Remark: This injection is not scaled. */ +void Interpolation::applyFMGInterpolation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarse_grid = fromLevel.grid(); + const PolarGrid& fine_grid = toLevel.grid(); + + assert(x.size() == coarse_grid.numberOfNodes()); + assert(result.size() == fine_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((fine_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (fine_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyFMG_Interpolation_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Interpolation/injection.cpp b/src/Interpolation/injection.cpp new file mode 100644 index 00000000..04b6b49b --- /dev/null +++ b/src/Interpolation/injection.cpp @@ -0,0 +1,43 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +/* Remark: This injection is not scaled. */ + +void Interpolation::applyInjection(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() + 1); + + const PolarGrid& fineGrid = fromLevel.grid(); + const PolarGrid& coarseGrid = toLevel.grid(); + + assert(x.size() == fineGrid.numberOfNodes()); + assert(result.size() == coarseGrid.numberOfNodes()); + + #pragma omp parallel if (fineGrid.numberOfNodes() > 10'000) + { + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r_coarse = 0; i_r_coarse < coarseGrid.numberSmootherCircles(); i_r_coarse++) + { + int i_r = i_r_coarse << 1; + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++) + { + int i_theta = i_theta_coarse << 1; + result[coarseGrid.index(i_r_coarse, i_theta_coarse)] = x[fineGrid.index(i_r, i_theta)]; + } + } + + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++) + { + int i_theta = i_theta_coarse << 1; + for (int i_r_coarse = coarseGrid.numberSmootherCircles(); i_r_coarse < coarseGrid.nr(); i_r_coarse++) + { + int i_r = i_r_coarse << 1; + result[coarseGrid.index(i_r_coarse, i_theta_coarse)] = x[fineGrid.index(i_r, i_theta)]; + } + } + } +} diff --git a/src/Interpolation/injection.cu b/src/Interpolation/injection.cu new file mode 100644 index 00000000..dff5f13f --- /dev/null +++ b/src/Interpolation/injection.cu @@ -0,0 +1,39 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyInjection_kernel(PolarGrid* coarse_grid, double* result, PolarGrid* fine_grid, double* x) { + int i_r_coarse = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta_coarse = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r_coarse < coarse_grid->nr() && i_theta_coarse < coarse_grid->ntheta()) { + int i_r = i_r_coarse << 1; + int i_theta = i_theta_coarse << 1; + + int fine_idx = fine_grid->index(i_r, i_theta); + int coarse_idx = coarse_grid->index(i_r_coarse, i_theta_coarse); + + result[coarse_idx] = x[fine_idx]; + } +} + +/* Remark: This injection is not scaled. */ +void Interpolation::applyInjection(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() + 1); + + const PolarGrid& fine_grid = fromLevel.grid(); + const PolarGrid& coarse_grid = toLevel.grid(); + + assert(x.size() == fine_grid.numberOfNodes()); + assert(result.size() == coarse_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((coarse_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (coarse_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyInjection_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Interpolation/interpolation.cpp b/src/Interpolation/interpolation.cpp new file mode 100644 index 00000000..662471b3 --- /dev/null +++ b/src/Interpolation/interpolation.cpp @@ -0,0 +1,7 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +Interpolation::Interpolation(const bool DirBC_Interior) + : DirBC_Interior_(DirBC_Interior) +{} \ No newline at end of file diff --git a/src/Interpolation/prolongation.cpp b/src/Interpolation/prolongation.cpp new file mode 100644 index 00000000..41e83bcb --- /dev/null +++ b/src/Interpolation/prolongation.cpp @@ -0,0 +1,104 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +// We use the anisotropic bilinear interpolation stencil. +// For an isotropic mesh, this stencil reduces to +// |1 2 1| +// P = 1/4 * |2 4 2| +// |1 2 1| + +#define FINE_NODE_PROLONGATION() \ +do { \ + if(i_r & 1) { \ + if(i_theta & 1) { \ + /* i_r % 2 == 1, i_theta % 2 == 1 */ \ + /* Fine node in the center of four coarse nodes */ \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + int i_theta_coarse_P1 = coarseGrid.wrapThetaIndex(i_theta_coarse+1); \ + double divisor = (h1+h2) * (k1+k2); \ + double value = ( \ + h1*k1*x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* Bottom left */ \ + h2*k1*x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] + /* Bottom right */ \ + h1*k2*x[coarseGrid.index(i_r_coarse, i_theta_coarse_P1)] + /* Top left */ \ + h2*k2*x[coarseGrid.index(i_r_coarse+1, i_theta_coarse_P1)] /* Top right */ \ + ); \ + result[fineGrid.index(i_r, i_theta)] = value / divisor; \ + } \ + else { \ + /* i_r % 2 == 1, i_theta % 2 == 0 */ \ + /* Fine node between coarse nodes in radial direction */ \ + double h1 = fineGrid.radialSpacing(i_r-1); \ + double h2 = fineGrid.radialSpacing(i_r); \ + double divisor = (h1+h2); \ + double value = ( \ + h1*x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* left */ \ + h2*x[coarseGrid.index(i_r_coarse+1, i_theta_coarse)] /* right */ \ + ); \ + result[fineGrid.index(i_r, i_theta)] = value / divisor; \ + } \ + } \ + else { \ + if(i_theta & 1) { \ + /* i_r % 2 == 0, i_theta % 2 == 1 */ \ + /* Fine node between coarse nodes in theta direction */ \ + double k1 = fineGrid.angularSpacing(i_theta-1); \ + double k2 = fineGrid.angularSpacing(i_theta); \ + int i_theta_coarse_P1 = coarseGrid.wrapThetaIndex(i_theta_coarse+1); \ + double divisor = (k1+k2); \ + double value = ( \ + k1*x[coarseGrid.index(i_r_coarse, i_theta_coarse)] + /* bottom */ \ + k2*x[coarseGrid.index(i_r_coarse, i_theta_coarse_P1)] /* top */ \ + ); \ + result[fineGrid.index(i_r, i_theta)] = value / divisor; \ + } \ + else { \ + /* i_r % 2 == 0, i_theta % 2 == 0 */ \ + /* Fine node appears in coarse grid */ \ + result[fineGrid.index(i_r, i_theta)] = x[coarseGrid.index(i_r_coarse, i_theta_coarse)]; /* center */ \ + } \ + } \ +} while(0) + +void Interpolation::applyProlongation(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarseGrid = fromLevel.grid(); + const PolarGrid& fineGrid = toLevel.grid(); + + assert(x.size() == coarseGrid.numberOfNodes()); + assert(result.size() == fineGrid.numberOfNodes()); + + #pragma omp parallel if (fineGrid.numberOfNodes() > 10'000) + { + /* Circluar Indexing Section */ + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r = 0; i_r < fineGrid.numberSmootherCircles(); i_r++) + { + int i_r_coarse = i_r >> 1; + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + FINE_NODE_PROLONGATION(); + } + } + + /* Radial Indexing Section */ + /* For loop matches radial access pattern */ + #pragma omp for nowait + for (int i_theta = 0; i_theta < fineGrid.ntheta(); i_theta++) + { + int i_theta_coarse = i_theta >> 1; + for (int i_r = fineGrid.numberSmootherCircles(); i_r < fineGrid.nr(); i_r++) + { + int i_r_coarse = i_r >> 1; + FINE_NODE_PROLONGATION(); + } + } + } +} diff --git a/src/Interpolation/prolongation.cu b/src/Interpolation/prolongation.cu new file mode 100644 index 00000000..3bdcb46d --- /dev/null +++ b/src/Interpolation/prolongation.cu @@ -0,0 +1,69 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyProlongation_kernel(PolarGrid* fine_grid, double* result, PolarGrid* coarse_grid, double* x) { + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r >= fine_grid->nr() || i_theta >= fine_grid->ntheta()) return; + + int i_r_coarse = i_r >> 1; + int i_theta_coarse = i_theta >> 1; + + double value = 0.0; + double divisor = 1.0; + + if (i_r & 1) { // i_r is odd + double h1 = fine_grid->radialSpacing(i_r - 1); + double h2 = fine_grid->radialSpacing(i_r); + if (i_theta & 1) { // i_theta is odd + double k1 = fine_grid->angularSpacing(i_theta - 1); + double k2 = fine_grid->angularSpacing(i_theta); + divisor = (h1 + h2) * (k1 + k2); + + value = h1 * k1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + + h2 * k1 * x[coarse_grid->index(i_r_coarse + 1, i_theta_coarse)] + + h1 * k2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse + 1)] + + h2 * k2 * x[coarse_grid->index(i_r_coarse + 1, i_theta_coarse + 1)]; + } else { // i_theta is even + divisor = (h1 + h2); + value = h1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + + h2 * x[coarse_grid->index(i_r_coarse + 1, i_theta_coarse)]; + } + } else { // i_r is even + if (i_theta & 1) { // i_theta is odd + double k1 = fine_grid->angularSpacing(i_theta - 1); + double k2 = fine_grid->angularSpacing(i_theta); + divisor = (k1 + k2); + + value = k1 * x[coarse_grid->index(i_r_coarse, i_theta_coarse)] + + k2 * x[coarse_grid->index(i_r_coarse, i_theta_coarse + 1)]; + } else { // i_theta is even + value = x[coarse_grid->index(i_r_coarse, i_theta_coarse)]; + } + } + + result[fine_grid->index(i_r, i_theta)] = value / divisor; +} + +/* Remark: This injection is not scaled. */ +void Interpolation::applyProlongation(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const +{ + assert(toLevel.level() == fromLevel.level() - 1); + + const PolarGrid& coarse_grid = fromLevel.grid(); + const PolarGrid& fine_grid = toLevel.grid(); + + assert(x.size() == coarse_grid.numberOfNodes()); + assert(result.size() == fine_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((fine_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (fine_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyProlongation_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Interpolation/restriction.cpp b/src/Interpolation/restriction.cpp new file mode 100644 index 00000000..48f4e100 --- /dev/null +++ b/src/Interpolation/restriction.cpp @@ -0,0 +1,168 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +// For the restriction we use R = P^T. +// The restriction for an siotropic mesh reduces to +// |1 2 1| +// R = 1/4 * |2 4 2| = P^T +// |1 2 1| + +void Interpolation::applyRestriction(const Level& fromLevel, const Level& toLevel, Vector& result, const Vector& x) const{ + assert(toLevel.level() == fromLevel.level() + 1); + + const PolarGrid& fineGrid = fromLevel.grid(); + const PolarGrid& coarseGrid = toLevel.grid(); + + assert(x.size() == fineGrid.numberOfNodes()); + assert(result.size() == coarseGrid.numberOfNodes()); + + const int coarseNumberSmootherCircles = coarseGrid.numberSmootherCircles(); + + #pragma omp parallel if(fineGrid.numberOfNodes() > 10'000) + { + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_r_coarse = 0; i_r_coarse < coarseNumberSmootherCircles; i_r_coarse++){ + int i_r = i_r_coarse << 1; + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++){ + int i_theta = i_theta_coarse << 1; + + if(0 < i_r_coarse && i_r_coarse < coarseNumberSmootherCircles-1){ + double h1 = fineGrid.radialSpacing(i_r-2); + double h2 = fineGrid.radialSpacing(i_r-1); + double h3 = fineGrid.radialSpacing(i_r); + double h4 = fineGrid.radialSpacing(i_r+1); + + int i_theta_M2 = fineGrid.wrapThetaIndex(i_theta-2); + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + + double k1 = fineGrid.angularSpacing(i_theta_M2); + double k2 = fineGrid.angularSpacing(i_theta_M1); + double k3 = fineGrid.angularSpacing(i_theta); + double k4 = fineGrid.angularSpacing(i_theta_P1); + + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = + // Center + x[fineGrid.index(i_r,i_theta)] + + // Left, Right, Bottom, Top + h2 * x[fineGrid.index(i_r-1, i_theta)] / (h1+h2) + + h3 * x[fineGrid.index(i_r+1, i_theta)] / (h3+h4) + + k2 * x[fineGrid.index(i_r, i_theta_M1)] / (k1+k2) + + k3 * x[fineGrid.index(i_r, i_theta_P1)] / (k3+k4) + + // Bottom Left, Bottom Right, Top Left, Top Right + h2*k2 * x[fineGrid.index(i_r-1, i_theta_M1)] / ((h1+h2)*(k1+k2)) + + h3*k2 * x[fineGrid.index(i_r+1, i_theta_M1)] / ((h3+h4)*(k1+k2)) + + h2*k3 * x[fineGrid.index(i_r-1, i_theta_P1)] / ((h1+h2)*(k3+k4)) + + h3*k3 * x[fineGrid.index(i_r+1, i_theta_P1)] / ((h3+h4)*(k3+k4)); + } else{ + /* First and Last Circle have to be checked for domain boundary */ + // Middle Part + int i_theta_M2 = fineGrid.wrapThetaIndex(i_theta-2); + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + double k1 = fineGrid.angularSpacing(i_theta_M2); + double k2 = fineGrid.angularSpacing(i_theta_M1); + double k3 = fineGrid.angularSpacing(i_theta); + double k4 = fineGrid.angularSpacing(i_theta_P1); + // Center, Bottom, Top + double value = x[fineGrid.index(i_r,i_theta)] + + k2 * x[fineGrid.index(i_r, i_theta_M1)] / (k1+k2) + + k3 * x[fineGrid.index(i_r, i_theta_P1)] / (k3+k4); + + if(i_r_coarse > 0){ + // Left Part + double h1 = fineGrid.radialSpacing(i_r-2); + double h2 = fineGrid.radialSpacing(i_r-1); + // Left, Bottom Left, Top Left + value += h2 * x[fineGrid.index(i_r-1, i_theta)] / (h1+h2) + + h2*k2 * x[fineGrid.index(i_r-1, i_theta_M1)] / ((h1+h2)*(k1+k2)) + + h2*k3 * x[fineGrid.index(i_r-1, i_theta_P1)] / ((h1+h2)*(k3+k4)); + } + if(i_r_coarse < coarseGrid.nr() - 1){ + // Right Part + double h3 = fineGrid.radialSpacing(i_r); + double h4 = fineGrid.radialSpacing(i_r+1); + // Right, Bottom Right, Top Right + value += h3 * x[fineGrid.index(i_r+1, i_theta)] / (h3+h4) + + h3*k2 * x[fineGrid.index(i_r+1, i_theta_M1)] / ((h3+h4)*(k1+k2)) + + h3*k3 * x[fineGrid.index(i_r+1, i_theta_P1)] / ((h3+h4)*(k3+k4)); + } + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = value; + } + } + } + + /* For loop matches circular access pattern */ + #pragma omp for nowait + for (int i_theta_coarse = 0; i_theta_coarse < coarseGrid.ntheta(); i_theta_coarse++){ + int i_theta = i_theta_coarse << 1; + for (int i_r_coarse = coarseNumberSmootherCircles; i_r_coarse < coarseGrid.nr(); i_r_coarse++){ + int i_r = i_r_coarse << 1; + + if(coarseGrid.numberSmootherCircles() < i_r_coarse && i_r_coarse < coarseGrid.nr()-1){ + double h1 = fineGrid.radialSpacing(i_r-2); + double h2 = fineGrid.radialSpacing(i_r-1); + double h3 = fineGrid.radialSpacing(i_r); + double h4 = fineGrid.radialSpacing(i_r+1); + + int i_theta_M2 = fineGrid.wrapThetaIndex(i_theta-2); + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + double k1 = fineGrid.angularSpacing(i_theta_M2); + double k2 = fineGrid.angularSpacing(i_theta_M1); + double k3 = fineGrid.angularSpacing(i_theta); + double k4 = fineGrid.angularSpacing(i_theta_P1); + + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = + // Center + x[fineGrid.index(i_r,i_theta)] + + // Left, Right, Bottom, Top + h2 * x[fineGrid.index(i_r-1, i_theta)] / (h1+h2) + + h3 * x[fineGrid.index(i_r+1, i_theta)] / (h3+h4) + + k2 * x[fineGrid.index(i_r, i_theta_M1)] / (k1+k2) + + k3 * x[fineGrid.index(i_r, i_theta_P1)] / (k3+k4) + + // Bottom Left, Bottom Right, Top Left, Top Right + h2*k2 * x[fineGrid.index(i_r-1, i_theta_M1)] / ((h1+h2)*(k1+k2)) + + h3*k2 * x[fineGrid.index(i_r+1, i_theta_M1)] / ((h3+h4)*(k1+k2)) + + h2*k3 * x[fineGrid.index(i_r-1, i_theta_P1)] / ((h1+h2)*(k3+k4)) + + h3*k3 * x[fineGrid.index(i_r+1, i_theta_P1)] / ((h3+h4)*(k3+k4)); + } else{ + /* First and Last radial nodes have to be checked for domain boundary */ + // Middle Part + int i_theta_M2 = fineGrid.wrapThetaIndex(i_theta-2); + int i_theta_M1 = fineGrid.wrapThetaIndex(i_theta-1); + int i_theta_P1 = fineGrid.wrapThetaIndex(i_theta+1); + double k1 = fineGrid.angularSpacing(i_theta_M2); + double k2 = fineGrid.angularSpacing(i_theta_M1); + double k3 = fineGrid.angularSpacing(i_theta); + double k4 = fineGrid.angularSpacing(i_theta_P1); + // Center, Bottom, Top + double value = x[fineGrid.index(i_r,i_theta)] + + k2 * x[fineGrid.index(i_r, i_theta_M1)] / (k1+k2) + + k3 * x[fineGrid.index(i_r, i_theta_P1)] / (k3+k4); + if(i_r_coarse > 0){ + // Left Part + double h1 = fineGrid.radialSpacing(i_r-2); + double h2 = fineGrid.radialSpacing(i_r-1); + // Left, Bottom Left, Top Left + value += h2 * x[fineGrid.index(i_r-1, i_theta)] / (h1+h2) + + h2*k2 * x[fineGrid.index(i_r-1, i_theta_M1)] / ((h1+h2)*(k1+k2)) + + h2*k3 * x[fineGrid.index(i_r-1, i_theta_P1)] / ((h1+h2)*(k3+k4)); + } + if(i_r_coarse < coarseGrid.nr() - 1){ + // Right Part + double h3 = fineGrid.radialSpacing(i_r); + double h4 = fineGrid.radialSpacing(i_r+1); + // Right, Bottom Right, Top Right + value += h3 * x[fineGrid.index(i_r+1, i_theta)] / (h3+h4) + + h3*k2 * x[fineGrid.index(i_r+1, i_theta_M1)] / ((h3+h4)*(k1+k2)) + + h3*k3 * x[fineGrid.index(i_r+1, i_theta_P1)] / ((h3+h4)*(k3+k4)); + } + result[coarseGrid.index(i_r_coarse,i_theta_coarse)] = value; + } + } + } + } +} diff --git a/src/Interpolation/restriction.cu b/src/Interpolation/restriction.cu new file mode 100644 index 00000000..cb2eda7e --- /dev/null +++ b/src/Interpolation/restriction.cu @@ -0,0 +1,65 @@ +#include "../../include/Interpolation/interpolation.h" + +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +__global__ void applyRestriction_kernel(PolarGrid* coarse_grid, double* result, PolarGrid* fine_grid, double* x) { + int i_r_coarse = blockIdx.x * blockDim.x + threadIdx.x; + int i_theta_coarse = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r_coarse < coarse_grid->nr() && i_theta_coarse < coarse_grid->ntheta()) { + int i_r = i_r_coarse << 1; + int i_theta = i_theta_coarse << 1; + + int i_theta_M2 = fine_grid->wrapThetaIndex(i_theta-2); + int i_theta_M1 = fine_grid->wrapThetaIndex(i_theta-1); + int i_theta_P1 = fine_grid->wrapThetaIndex(i_theta+1); + double k1 = fine_grid->angularSpacing(i_theta_M2); + double k2 = fine_grid->angularSpacing(i_theta_M1); + double k3 = fine_grid->angularSpacing(i_theta); + double k4 = fine_grid->angularSpacing(i_theta_P1); + + // Center, Bottom, Top + double value = x[fine_grid->index(i_r,i_theta)] + + k2 * x[fine_grid->index(i_r, i_theta_M1)] / (k1+k2) + + k3 * x[fine_grid->index(i_r, i_theta_P1)] / (k3+k4); + + if(i_r_coarse > 0){ + // Left Part + double h1 = fine_grid->radialSpacing(i_r-2); + double h2 = fine_grid->radialSpacing(i_r-1); + // Left, Bottom Left, Top Left + value += h2 * x[fine_grid->index(i_r-1, i_theta)] / (h1+h2) + + h2*k2 * x[fine_grid->index(i_r-1, i_theta_M1)] / ((h1+h2)*(k1+k2)) + + h2*k3 * x[fine_grid->index(i_r-1, i_theta_P1)] / ((h1+h2)*(k3+k4)); + } + if(i_r_coarse < coarse_grid->nr() - 1){ + // Right Part + double h3 = fine_grid->radialSpacing(i_r); + double h4 = fine_grid->radialSpacing(i_r+1); + // Right, Bottom Right, Top Right + value += h3 * x[fine_grid->index(i_r+1, i_theta)] / (h3+h4) + + h3*k2 * x[fine_grid->index(i_r+1, i_theta_M1)] / ((h3+h4)*(k1+k2)) + + h3*k3 * x[fine_grid->index(i_r+1, i_theta_P1)] / ((h3+h4)*(k3+k4)); + } + result[coarse_grid->index(i_r_coarse,i_theta_coarse)] = value; + } +} + +void Interpolation::applyRestriction(const Level& fromLevel, const Level& toLevel, GPU_Vector& result, const GPU_Vector& x) const{ + assert(toLevel.level() == fromLevel.level() + 1); + + const PolarGrid& fine_grid = fromLevel.grid(); + const PolarGrid& coarse_grid = toLevel.grid(); + + assert(x.size() == fine_grid.numberOfNodes()); + assert(result.size() == coarse_grid.numberOfNodes()); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((coarse_grid.nr() + threadsPerBlock.x - 1) / threadsPerBlock.x, + (coarse_grid.ntheta() + threadsPerBlock.y - 1) / threadsPerBlock.y); + + applyRestriction_kernel<<>>( + toLevel.device_grid(), result.data(), fromLevel.device_grid(), x.data()); + + cudaDeviceSynchronize(); +} diff --git a/src/Level/level.cu b/src/Level/level.cu new file mode 100644 index 00000000..de86864e --- /dev/null +++ b/src/Level/level.cu @@ -0,0 +1,315 @@ +#include "../../include/Level/level.h" + +#include "../../include/Residual/ResidualTakeCPU/residual.h" +#include "../../include/Residual/ResidualTakeGPU/residual.h" + +#include "../../include/DirectSolver/directSolver.h" + +#include "../../include/Smoother/SmootherTakeCPU/smoother.h" +#include "../../include/Smoother/SmootherTakeGPU/smoother.h" + +#include "../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" +#include "../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +Level::Level(const int level, const ProcessingType processing_type, std::unique_ptr grid, + std::unique_ptr level_cache, const ExtrapolationType extrapolation, const bool FMG) + : level_(level) + , processing_type_(processing_type) + , grid_(std::move(grid)) + , level_cache_(std::move(level_cache)) + , extrapolation_(extrapolation) + , FMG_(FMG) + , device_grid_(nullptr) +{ + const auto num_nodes = grid_->numberOfNodes(); + const auto rhs_size = + (FMG_ || level_ == 0 || (level_ == 1 && extrapolation_ != ExtrapolationType::NONE)) ? num_nodes : 0; + const auto error_size = (level_ > 0) ? num_nodes : 0; + + if (processing_type == ProcessingType::CPU || processing_type == ProcessingType::CPU_HYBRID) { + rhs_ = Vector(rhs_size); + solution_ = Vector(num_nodes); + residual_ = Vector(num_nodes); + error_correction_ = Vector(error_size); + } + else { + rhs_ = Vector(0); + solution_ = Vector(0); + residual_ = Vector(0); + error_correction_ = Vector(0); + } + + if (processing_type == ProcessingType::GPU || processing_type == ProcessingType::CPU_HYBRID) { + cudaMalloc(&device_grid_, sizeof(PolarGrid)); + cudaMemcpy(device_grid_, grid_.get(), sizeof(PolarGrid), cudaMemcpyHostToDevice); + gpu_rhs_ = GPU_Vector(rhs_size); + gpu_solution_ = GPU_Vector(num_nodes); + gpu_residual_ = GPU_Vector(num_nodes); + gpu_error_correction_ = GPU_Vector(error_size); + } + else { + gpu_rhs_ = GPU_Vector(0); + gpu_solution_ = GPU_Vector(0); + gpu_residual_ = GPU_Vector(0); + gpu_error_correction_ = GPU_Vector(0); + } +} + +Level::Level(Level&& other) noexcept + : level_(other.level_) + , processing_type_(other.processing_type_) + , grid_(std::move(other.grid_)) + , device_grid_(other.device_grid_) + , level_cache_(std::move(other.level_cache_)) + , extrapolation_(other.extrapolation_) + , FMG_(other.FMG_) + , rhs_(std::move(other.rhs_)) + , solution_(std::move(other.solution_)) + , residual_(std::move(other.residual_)) + , error_correction_(std::move(other.error_correction_)) + , gpu_rhs_(std::move(other.gpu_rhs_)) + , gpu_solution_(std::move(other.gpu_solution_)) + , gpu_residual_(std::move(other.gpu_residual_)) + , gpu_error_correction_(std::move(other.gpu_error_correction_)) +{ + other.device_grid_ = nullptr; +} + +// Move Assignment Operator +Level& Level::operator=(Level&& other) noexcept +{ + if (this != &other) { + // Free existing GPU resources if necessary + if (device_grid_) { + cudaFree(device_grid_); + } + + // Move data members + level_ = other.level_; + grid_ = std::move(other.grid_); + device_grid_ = other.device_grid_; + level_cache_ = std::move(other.level_cache_); + extrapolation_ = other.extrapolation_; + FMG_ = other.FMG_; + + rhs_ = std::move(other.rhs_); + solution_ = std::move(other.solution_); + residual_ = std::move(other.residual_); + error_correction_ = std::move(other.error_correction_); + gpu_rhs_ = std::move(other.gpu_rhs_); + gpu_solution_ = std::move(other.gpu_solution_); + gpu_residual_ = std::move(other.gpu_residual_); + gpu_error_correction_ = std::move(other.gpu_error_correction_); + + // Leave the source object in a valid state + other.device_grid_ = nullptr; + } + return *this; +} +// Destructor +Level::~Level() +{ +if (device_grid_) { + cudaPointerAttributes attributes; + cudaError_t err = cudaPointerGetAttributes(&attributes, device_grid_); + if (err != cudaSuccess) { + std::cerr << "Invalid device pointer before free: " << cudaGetErrorString(err) << std::endl; + } + cudaFree(device_grid_); + device_grid_ = nullptr; +} +} + +// ---------------- // +// Getter Functions // +int Level::level() const +{ + return level_; +} + +const PolarGrid& Level::grid() const +{ + return *grid_; +} + +ProcessingType Level::processingType() const +{ + return processing_type_; +} + +PolarGrid* Level::device_grid() const +{ + return device_grid_; +} + +const LevelCache& Level::levelCache() const +{ + return *level_cache_; +} + +Vector& Level::rhs() +{ + return rhs_; +} +const Vector& Level::rhs() const +{ + return rhs_; +} +Vector& Level::solution() +{ + return solution_; +} +const Vector& Level::solution() const +{ + return solution_; +} +Vector& Level::residual() +{ + return residual_; +} +const Vector& Level::residual() const +{ + return residual_; +} +Vector& Level::error_correction() +{ + return error_correction_; +} +const Vector& Level::error_correction() const +{ + return error_correction_; +} + +GPU_Vector& Level::GPU_rhs() +{ + return gpu_rhs_; +} +const GPU_Vector& Level::GPU_rhs() const +{ + return gpu_rhs_; +} +GPU_Vector& Level::GPU_solution() +{ + return gpu_solution_; +} +const GPU_Vector& Level::GPU_solution() const +{ + return gpu_solution_; +} +GPU_Vector& Level::GPU_residual() +{ + return gpu_residual_; +} +const GPU_Vector& Level::GPU_residual() const +{ + return gpu_residual_; +} +GPU_Vector& Level::GPU_error_correction() +{ + return gpu_error_correction_; +} +const GPU_Vector& Level::GPU_error_correction() const +{ + return gpu_error_correction_; +} + + +// -------------- // +// Apply Residual // +void Level::initializeResidual(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior) +{ + if(processing_type_ == ProcessingType::GPU){ + op_residual_GPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_residual_GPU_) throw std::runtime_error("Failed to initialize GPU Residual."); + } + else{ + op_residual_CPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_residual_CPU_) throw std::runtime_error("Failed to initialize CPU Residual."); + } +} + +void Level::computeResidual(Vector& result, const Vector& rhs, const Vector& x) const +{ + if (!op_residual_CPU_) throw std::runtime_error("CPU Residual not initialized."); + op_residual_CPU_->computeResidual(result, rhs, x); +} +void Level::computeResidual(GPU_Vector& result, const GPU_Vector& rhs, const GPU_Vector& x) const +{ + if (!op_residual_GPU_) throw std::runtime_error("GPU Residual not initialized."); + op_residual_GPU_->computeResidual(result, rhs, x); +} + + +// ------------------- // +// Solve coarse System // +void Level::initializeDirectSolver(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior) +{ + + op_directSolver_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_directSolver_) throw std::runtime_error("Failed to initialize Direct Solver."); +} +void Level::directSolveInPlace(Vector& x) const +{ + if (!op_directSolver_) throw std::runtime_error("Coarse Solver not initialized."); + op_directSolver_->solveInPlace(x); +} + + +// --------------- // +// Apply Smoothing // +void Level::initializeSmoothing(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior) +{ + if(processing_type_ == ProcessingType::GPU){ + op_smoother_GPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_smoother_GPU_) throw std::runtime_error("Failed to initialize GPU Smoother."); + } + else{ + op_smoother_CPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_smoother_CPU_) throw std::runtime_error("Failed to initialize CPU Smoother."); + } +} + +void Level::smoothingInPlace(Vector& x, const Vector& rhs, Vector& temp) const +{ + if (!op_smoother_CPU_) throw std::runtime_error("CPU Smoother not initialized."); + op_smoother_CPU_->smoothingInPlace(x, rhs, x); +} +void Level::smoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) const +{ + if (!op_smoother_GPU_) throw std::runtime_error("GPU Smoother not initialized."); + op_smoother_GPU_->smoothingInPlace(x, rhs, temp); +} + +// ---------------------------- // +// Apply Extrapolated Smoothing // +void Level::initializeExtrapolatedSmoothing(const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, + const bool DirBC_Interior) +{ + if(processing_type_ == ProcessingType::GPU){ + op_extrapolated_smoother_GPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_extrapolated_smoother_GPU_) throw std::runtime_error("Failed to initialize GPU Extrapolated Smoother."); + } + else{ + op_extrapolated_smoother_CPU_ = std::make_unique(*this, domain_geometry, density_profile_coefficients, DirBC_Interior); + if (!op_extrapolated_smoother_CPU_) throw std::runtime_error("Failed to initialize CPU Extrapolated Smoother."); + } +} + +void Level::extrapolatedSmoothingInPlace(Vector& x, const Vector& rhs, Vector& temp) const +{ + if (!op_extrapolated_smoother_CPU_) throw std::runtime_error("CPU Extrapolated Smoother not initialized."); + op_extrapolated_smoother_CPU_->extrapolatedSmoothingInPlace(x, rhs, x); +} +void Level::extrapolatedSmoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) const +{ + if (!op_extrapolated_smoother_GPU_) throw std::runtime_error("GPU Extrapolated Smoother not initialized."); + op_extrapolated_smoother_GPU_->extrapolatedSmoothingInPlace(x, rhs, temp); +} + diff --git a/src/Level/levelCache.cu b/src/Level/levelCache.cu new file mode 100644 index 00000000..36253fe2 --- /dev/null +++ b/src/Level/levelCache.cu @@ -0,0 +1,174 @@ +#include "../../include/Level/level.h" + +LevelCache::LevelCache( + const ProcessingType processing_type, + const PolarGrid& grid, + const DensityProfileCoefficients& density_profile_coefficients, + const DomainGeometry& domain_geometry +) : + processing_type_(processing_type), + + sin_theta_(processing_type != ProcessingType::GPU ? grid.ntheta() : 0), + cos_theta_(processing_type != ProcessingType::GPU ? grid.ntheta() : 0), + + coeff_alpha_(processing_type != ProcessingType::GPU ? grid.nr() : 0), + coeff_beta_(processing_type != ProcessingType::GPU ? grid.nr() : 0), + + arr_(processing_type != ProcessingType::GPU ? grid.numberOfNodes() : 0), + att_(processing_type != ProcessingType::GPU ? grid.numberOfNodes() : 0), + art_(processing_type != ProcessingType::GPU ? grid.numberOfNodes() : 0), + detDF_(processing_type != ProcessingType::GPU ? grid.numberOfNodes() : 0), + + gpu_sin_theta_(processing_type == ProcessingType::GPU ? grid.ntheta() : 0), + gpu_cos_theta_(processing_type == ProcessingType::GPU ? grid.ntheta() : 0), + + gpu_coeff_alpha_(processing_type == ProcessingType::GPU ? grid.nr() : 0), + gpu_coeff_beta_(processing_type == ProcessingType::GPU ? grid.nr() : 0) +{ + if(processing_type_ != ProcessingType::GPU){ + #pragma omp parallel for + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++){ + const double theta = grid.theta(i_theta); + sin_theta_[i_theta] = sin(theta); + cos_theta_[i_theta] = cos(theta); + } + #pragma omp parallel for + for (int i_r = 0; i_r < grid.nr(); i_r++){ + const double r = grid.radius(i_r); + coeff_alpha_[i_r] = density_profile_coefficients.alpha(r); + coeff_beta_[i_r] = density_profile_coefficients.beta(r); + } + + #pragma omp parallel for + for (int i_r = 0; i_r < grid.numberSmootherCircles(); i_r++) { + const double r = grid.radius(i_r); + double coeff_alpha = coeff_alpha_[i_r];; + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) { + const double theta = grid.theta(i_theta); + const double sin_theta = sin_theta_[i_theta]; + const double cos_theta = cos_theta_[i_theta]; + const double index = grid.index(i_r, i_theta); + /* Calculate the elements of the Jacobian matrix for the transformation mapping */ + /* The Jacobian matrix is: */ + /* [Jrr, Jrt] */ + /* [Jtr, Jtt] */ + const double Jrr = domain_geometry.dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry.dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry.dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry.dFy_dt(r, theta, sin_theta, cos_theta); + /* Compute the determinant of the Jacobian matrix */ + detDF_[index] = Jrr * Jtt - Jrt * Jtr; + /* Compute the elements of the symmetric matrix: */ + /* 0.5 * alpha * DF^{-1} * DF^{-T} * |det(DF)| */ + /* which is represented by: */ \ + /* [arr, 0.5*art] */ \ + /* [0.5*atr, att] */ \ + arr_[index] = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF_[index] ); + att_[index] = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF_[index] ); + art_[index] = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF_[index] ); + /* Note that the inverse Jacobian matrix DF^{-1} is: */ + /* 1.0 / det(DF) * */ + /* [Jtt, -Jrt] */ + /* [-Jtr, Jrr] */ + } + } + + #pragma omp parallel for + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++) { + const double theta = grid.theta(i_theta); + const double sin_theta = sin_theta_[i_theta]; + const double cos_theta = cos_theta_[i_theta]; + for (int i_r = grid.numberSmootherCircles(); i_r < grid.nr(); i_r++) { + const double r = grid.radius(i_r); + const double index = grid.index(i_r, i_theta); + double coeff_alpha = coeff_alpha_[i_r]; + /* Calculate the elements of the Jacobian matrix for the transformation mapping */ + /* The Jacobian matrix is: */ + /* [Jrr, Jrt] */ + /* [Jtr, Jtt] */ + const double Jrr = domain_geometry.dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry.dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry.dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry.dFy_dt(r, theta, sin_theta, cos_theta); + /* Compute the determinant of the Jacobian matrix */ + detDF_[index] = Jrr * Jtt - Jrt * Jtr; + /* Compute the elements of the symmetric matrix: */ + /* 0.5 * alpha * DF^{-1} * DF^{-T} * |det(DF)| */ + /* which is represented by: */ \ + /* [arr, 0.5*art] */ \ + /* [0.5*atr, att] */ \ + arr_[index] = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF_[index] ); + att_[index] = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF_[index] ); + art_[index] = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF_[index] ); + /* Note that the inverse Jacobian matrix DF^{-1} is: */ + /* 1.0 / det(DF) * */ + /* [Jtt, -Jrt] */ + /* [-Jtr, Jrr] */ + } + } + } + else if(processing_type_ == ProcessingType::GPU){ + Vector sin_theta_host(grid.ntheta()); + Vector cos_theta_host(grid.ntheta()); + #pragma omp parallel for + for (int i_theta = 0; i_theta < grid.ntheta(); i_theta++){ + const double theta = grid.theta(i_theta); + sin_theta_host[i_theta] = sin(theta); + cos_theta_host[i_theta] = cos(theta); + } + copyHostToDevice(sin_theta_host, gpu_sin_theta_); + copyHostToDevice(cos_theta_host, gpu_cos_theta_); + + Vector coeff_alpha_host(grid.nr()); + Vector coeff_beta_host(grid.nr()); + for (int i_r = 0; i_r < grid.nr(); i_r++){ + const double r = grid.radius(i_r); + coeff_alpha_host[i_r] = density_profile_coefficients.alpha(r); + coeff_beta_host[i_r] = density_profile_coefficients.beta(r); + } + copyHostToDevice(coeff_alpha_host, gpu_coeff_alpha_); + copyHostToDevice(coeff_beta_host, gpu_coeff_beta_); + } +} + + +const std::vector& LevelCache::sin_theta() const { + return sin_theta_; +} +const std::vector& LevelCache::cos_theta() const { + return cos_theta_; +} + +const std::vector& LevelCache::coeff_alpha() const { + return coeff_alpha_; +} +const std::vector& LevelCache::coeff_beta() const { + return coeff_beta_; +} + +const Vector& LevelCache::arr() const { + return arr_; +} +const Vector& LevelCache::att() const { + return att_; +} +const Vector& LevelCache::art() const { + return art_; +} +const Vector& LevelCache::detDF() const { + return detDF_; +} + +const GPU_Vector& LevelCache::GPU_sin_theta() const { + return gpu_sin_theta_; +} +const GPU_Vector& LevelCache::GPU_cos_theta() const { + return gpu_cos_theta_; +} + +const GPU_Vector& LevelCache::GPU_coeff_alpha() const { + return gpu_coeff_alpha_; +} +const GPU_Vector& LevelCache::GPU_coeff_beta() const { + return gpu_coeff_beta_; +} \ No newline at end of file diff --git a/src/PolarGrid/polargrid.cu b/src/PolarGrid/polargrid.cu new file mode 100644 index 00000000..95c6dea8 --- /dev/null +++ b/src/PolarGrid/polargrid.cu @@ -0,0 +1,632 @@ +#include "../../include/PolarGrid/polargrid.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../include/common/equals.h" + +// ------------ // +// Constructors // +// ------------ // + +// Constructor to initialize grid using vectors of radii and angles. +PolarGrid::PolarGrid(const std::vector& radii, const std::vector& angles, std::optional splitting_radius) + : nr_(radii.size()) + , ntheta_(angles.size() - 1) + , is_ntheta_PowerOfTwo_((ntheta_ & (ntheta_ - 1)) == 0) + , radii_(radii) + , angles_(angles) + , d_radii_(nullptr) + , d_angles_(nullptr) + , d_radial_spacings_(nullptr) + , d_angular_spacings_(nullptr) +{ + // Check parameter validity + checkParameters(radii, angles); + // Store distances to adjacent neighboring nodes. + // Initializes radial_spacings_, angular_spacings_ + initializeDistances(); + // Initializes smoothers splitting radius for circle/radial indexing. + initializeLineSplitting(splitting_radius); + + allocateDeviceMemory(); + copyDataToDevice(); +} + +// Constructor to initialize grid using parameters from GMGPolar. +PolarGrid::PolarGrid( + const double& R0, + const double& Rmax, + const int nr_exp, + const int ntheta_exp, + const double& refinement_radius, + const int anisotropic_factor, + const int divideBy2, + std::optional splitting_radius +) + : d_radii_(nullptr) + , d_angles_(nullptr) + , d_radial_spacings_(nullptr) + , d_angular_spacings_(nullptr) +{ + assert(0.0 < R0 && R0 < Rmax); + // Construct radii_ and angles_ + constructRadialDivisions(R0, Rmax, nr_exp, refinement_radius, anisotropic_factor); + constructAngularDivisions(ntheta_exp, nr_); + refineGrid(divideBy2); + // Check parameter validity + checkParameters(radii_, angles_); + // Store distances to adjacent neighboring nodes. + // Initializes radial_spacings_, angular_spacings_ + initializeDistances(); + // Initializes smoothers splitting radius for circle/radial indexing. + initializeLineSplitting(splitting_radius); + + allocateDeviceMemory(); + copyDataToDevice(); +} + +// Copy Constructor +PolarGrid::PolarGrid(const PolarGrid& other) + : nr_(other.nr_), ntheta_(other.ntheta_), is_ntheta_PowerOfTwo_(other.is_ntheta_PowerOfTwo_), + radii_(other.radii_), angles_(other.angles_), radial_spacings_(other.radial_spacings_), + angular_spacings_(other.angular_spacings_), + smoother_splitting_radius_(other.smoother_splitting_radius_), + number_smoother_circles_(other.number_smoother_circles_), + length_smoother_radial_(other.length_smoother_radial_), + number_circular_smoother_nodes_(other.number_circular_smoother_nodes_), + number_radial_smoother_nodes_(other.number_radial_smoother_nodes_) +{ + allocateDeviceMemory(); + copyDataToDevice(); +} + +// Copy Assignment Operator +PolarGrid& PolarGrid::operator=(const PolarGrid& other) +{ + if (this != &other) + { + freeDeviceMemory(); // Release existing resources + + // Copy data from the source + nr_ = other.nr_; + ntheta_ = other.ntheta_; + is_ntheta_PowerOfTwo_ = other.is_ntheta_PowerOfTwo_; + radii_ = other.radii_; + angles_ = other.angles_; + radial_spacings_ = other.radial_spacings_; + angular_spacings_ = other.angular_spacings_; + smoother_splitting_radius_ = other.smoother_splitting_radius_; + number_smoother_circles_ = other.number_smoother_circles_; + length_smoother_radial_ = other.length_smoother_radial_; + number_circular_smoother_nodes_ = other.number_circular_smoother_nodes_; + number_radial_smoother_nodes_ = other.number_radial_smoother_nodes_; + + allocateDeviceMemory(); + copyDataToDevice(); + } + return *this; +} + +// Move Constructor +PolarGrid::PolarGrid(PolarGrid&& other) noexcept + : nr_(other.nr_), ntheta_(other.ntheta_), is_ntheta_PowerOfTwo_(other.is_ntheta_PowerOfTwo_), + radii_(std::move(other.radii_)), angles_(std::move(other.angles_)), + d_radii_(other.d_radii_), d_angles_(other.d_angles_), + radial_spacings_(std::move(other.radial_spacings_)), angular_spacings_(std::move(other.angular_spacings_)), + d_radial_spacings_(other.d_radial_spacings_), d_angular_spacings_(other.d_angular_spacings_), + smoother_splitting_radius_(other.smoother_splitting_radius_), + number_smoother_circles_(other.number_smoother_circles_), + length_smoother_radial_(other.length_smoother_radial_), + number_circular_smoother_nodes_(other.number_circular_smoother_nodes_), + number_radial_smoother_nodes_(other.number_radial_smoother_nodes_) +{ + other.d_radii_ = nullptr; + other.d_angles_ = nullptr; + other.d_radial_spacings_ = nullptr; + other.d_angular_spacings_ = nullptr; +} + +// Move Assignment Operator +PolarGrid& PolarGrid::operator=(PolarGrid&& other) noexcept +{ + if (this != &other) + { + freeDeviceMemory(); // Release existing resources + + // Transfer ownership + nr_ = other.nr_; + ntheta_ = other.ntheta_; + is_ntheta_PowerOfTwo_ = other.is_ntheta_PowerOfTwo_; + radii_ = std::move(other.radii_); + angles_ = std::move(other.angles_); + d_radii_ = other.d_radii_; + d_angles_ = other.d_angles_; + radial_spacings_ = std::move(other.radial_spacings_); + angular_spacings_ = std::move(other.angular_spacings_); + d_radial_spacings_ = other.d_radial_spacings_; + d_angular_spacings_ = other.d_angular_spacings_; + smoother_splitting_radius_ = other.smoother_splitting_radius_; + number_smoother_circles_ = other.number_smoother_circles_; + length_smoother_radial_ = other.length_smoother_radial_; + number_circular_smoother_nodes_ = other.number_circular_smoother_nodes_; + number_radial_smoother_nodes_ = other.number_radial_smoother_nodes_; + + // Nullify source object + other.d_radii_ = nullptr; + other.d_angles_ = nullptr; + other.d_radial_spacings_ = nullptr; + other.d_angular_spacings_ = nullptr; + } + return *this; +} + +// Destructor +PolarGrid::~PolarGrid() +{ + freeDeviceMemory(); +} + +// ------------------- // +// Constructor Helpers // +// ------------------- // + +// Construct radial divisions for grid generation. +void PolarGrid::constructRadialDivisions( + const double& R0, const double& R, const int nr_exp, const double& refinement_radius, const int anisotropic_factor) +{ + // r_temp contains the values before we refine one last time for extrapolation. + // Therefore we first consider 2^(nr_exp-1) points. + std::vector r_temp; + if (anisotropic_factor == 0) + { + int nr = pow(2, nr_exp - 1) + 1; + double uniform_distance = (R - R0) / (nr - 1); + assert(uniform_distance > 0.0); + r_temp.resize(nr); + for (int i = 0; i < nr - 1; i++) + { + r_temp[i] = R0 + i * uniform_distance; + } + r_temp[nr - 1] = R; + } + else + { + // Implementation in src/PolarGrid/anisotropic_division.cpp + RadialAnisotropicDivision(r_temp, R0, R, nr_exp, refinement_radius, anisotropic_factor); + } + // Refine division in the middle for extrapolation + nr_ = 2 * r_temp.size() - 1; + radii_.resize(nr_); + for (int i = 0; i < nr_; i++) + { + if (!(i % 2)) + radii_[i] = r_temp[i / 2]; + else + radii_[i] = 0.5 * (r_temp[(i - 1) / 2] + r_temp[(i + 1) / 2]); + } +} + +// Construct angular divisions for grid generation. +// Currently we dont allow anisotropic refinement in angular direction +void PolarGrid::constructAngularDivisions(const int ntheta_exp, const int nr) +{ + if (ntheta_exp < 0) + { + // Choose number of theta divisions similar to radial divisions. + ntheta_ = pow(2, ceil(log2(nr))); + // ntheta_ = pow(2, ceil(log2(nr-1))); + } + else + { + ntheta_ = pow(2, ntheta_exp); + } + is_ntheta_PowerOfTwo_ = (ntheta_ & (ntheta_ - 1)) == 0; + // Note that currently ntheta_ = 2^k which allows us to do some optimizations when indexing. + double uniform_distance = 2 * M_PI / ntheta_; + angles_.resize(ntheta_ + 1); + for (int i = 0; i < ntheta_; i++) + { + angles_[i] = i * uniform_distance; + } + angles_[ntheta_] = 2 * M_PI; +} + +// divideBy2: Number of times to divide both radial and angular divisions by 2. +void PolarGrid::refineGrid(const int divideBy2) +{ + radii_ = divideVector(radii_, divideBy2); + angles_ = divideVector(angles_, divideBy2); + nr_ = radii_.size(); + ntheta_ = angles_.size() - 1; + is_ntheta_PowerOfTwo_ = (ntheta_ & (ntheta_ - 1)) == 0; +} + +std::vector PolarGrid::divideVector(const std::vector& vec, const int divideBy2) const +{ + const double powerOfTwo = 1 << divideBy2; + size_t vecSize = vec.size(); + size_t resultSize = vecSize + (vecSize - 1) * (powerOfTwo - 1); + std::vector result(resultSize); + + for (size_t i = 0; i < vecSize - 1; ++i) + { + size_t baseIndex = i * powerOfTwo; + result[baseIndex] = vec[i]; // Add the original value + for (int j = 1; j < powerOfTwo; ++j) + { + double interpolated_value = vec[i] + j * (vec[i + 1] - vec[i]) / powerOfTwo; + result[baseIndex + j] = interpolated_value; + } + } + result[resultSize - 1] = vec.back(); // Add the last value of the original vector + return result; +} + +void PolarGrid::initializeDistances() +{ + // radial_spacings contains the distances between each consecutive radii division. + // radial_spacings = [R_1-R0, ..., R_{N} - R_{N-1}]. + radial_spacings_.resize(nr() - 1); + for (int i = 0; i < nr() - 1; i++) + { + radial_spacings_[i] = radius(i + 1) - radius(i); + } + // angular_spacings contains the angles between each consecutive theta division. + // Since we have a periodic boundary in theta direction, + // we have to make sure the index wraps around correctly when accessing it. + // Here theta_0 = 0.0 and theta_N = 2*pi refer to the same point. + // angular_spacings = [theta_{1}-theta_{0}, ..., theta_{N}-theta_{N-1}]. + angular_spacings_.resize(ntheta()); + for (int i = 0; i < ntheta(); i++) + { + angular_spacings_[i] = theta(i + 1) - theta(i); + } +} + +// Initializes line splitting parameters for Circle/radial indexing. +// splitting_radius: The radius value used for dividing the smoother into a circular and radial section. +// If std::nullopt, automatic line-splitting is enabled. +// If the splitting radius is less than R0, only Radial indexing is used. +// If the splitting radius is greater than or equal to R, only Circular indexing is used. +void PolarGrid::initializeLineSplitting(std::optional splitting_radius) +{ + if (splitting_radius.has_value()) + { + + + if (splitting_radius.value() < radii_.front()) + { + number_smoother_circles_ = 0; + length_smoother_radial_ = nr(); + smoother_splitting_radius_ = -1.0; + } + else + { + auto it = std::lower_bound(radii_.begin(), radii_.end(), splitting_radius.value()); + if (it != radii_.end()) + { + number_smoother_circles_ = std::distance(radii_.begin(), it); + length_smoother_radial_ = nr() - number_smoother_circles_; + smoother_splitting_radius_ = splitting_radius.value(); + } + else + { + number_smoother_circles_ = nr(); + length_smoother_radial_ = 0; + smoother_splitting_radius_ = radii_.back() + 1.0; + } + } + } + else + { + number_smoother_circles_ = 2; /* We assume numberSmootherCircles_ >= 2 in the further implementation */ + for (int i_r = 2; i_r < nr() - 2; i_r++) + { /* We assume lengthSmootherRadial_ >= 3 in the further implementation */ + double uniform_theta_k = (2 * M_PI) / ntheta(); + double radius_r = radius(i_r); + double radial_dist_h = radius(i_r) - radius(i_r - 1); + + double q = uniform_theta_k / radial_dist_h; + if (q * radius_r > 1.0) + { + number_smoother_circles_ = i_r; + break; + } + } + /* The ExtrapolatedSmoother requires numberSmootherCircles_ >= 3 and lengthSmootherRadial_ >= 3. */ + if (number_smoother_circles_ < 3 && nr() > 5) number_smoother_circles_ = 3; + + length_smoother_radial_ = nr() - number_smoother_circles_; + smoother_splitting_radius_ = radius(number_smoother_circles_); + } + + number_circular_smoother_nodes_ = number_smoother_circles_ * ntheta(); + number_radial_smoother_nodes_ = length_smoother_radial_ * ntheta(); + + assert(numberSmootherCircles() + lengthSmootherRadial() == nr()); + assert(numberCircularSmootherNodes() + numberRadialSmootherNodes() == numberOfNodes()); +} + +// ------------------------ // +// Check parameter validity // +// ---------------------..- // + +void PolarGrid::checkParameters(const std::vector& radii, const std::vector& angles) const +{ + if (radii.size() < 2) + { + throw std::invalid_argument("At least two radii are required."); + } + + if (!std::all_of(radii.begin(), radii.end(), [](double r) { return r > 0.0; })) + { + throw std::invalid_argument("All radii must be greater than zero."); + } + + if (std::adjacent_find(radii.begin(), radii.end(), std::greater_equal()) != radii.end()) + { + throw std::invalid_argument("Radii must be strictly increasing."); + } + + if (angles.size() < 3) + { + throw std::invalid_argument("At least two angles are required."); + } + + if (!std::all_of(angles.begin(), angles.end(), [](double theta) { return theta >= 0.0; })) + { + throw std::invalid_argument("All angles must be non-negative."); + } + + if (std::adjacent_find(angles.begin(), angles.end(), std::greater_equal()) != angles.end()) + { + throw std::invalid_argument("Angles must be strictly increasing."); + } + + if (!equals(angles.front(), 0.0)) + { + throw std::invalid_argument("First angle must be 0."); + } + + if (!equals(angles.back(), 2 * M_PI)) + { + throw std::invalid_argument("Last angle must be 2*pi."); + } + + // Additional constraint for our stencil. Not needed in general. + if (!std::all_of(angles.begin(), angles.end(), + [&angles](double theta) + { + double opposite = theta + M_PI >= 2 * M_PI ? theta - M_PI : theta + M_PI; + return std::find_if(angles.begin(), angles.end(), [&opposite](double angle) { return equals(opposite, angle); }) != + angles.end(); + })) + { + throw std::invalid_argument("Each angle must have its opposite in the set:\n" + "Every node in the interior ring needs to have an opposite neighboring node."); + } +} + +void PolarGrid::RadialAnisotropicDivision( + std::vector& r_temp, + const double& R0, + const double& R, + const int nr_exp, + const double& refinement_radius, + const int anisotropic_factor) const +{ + // Calculate the percentage of refinement_radius. + const double percentage = (refinement_radius - R0) / (R - R0); + assert(percentage >= 0.0 && percentage <= 1.0); + + // 1) uniform division with nr=2^dummy_lognr - 2^aniso + // 2) remaining nodes are added by refining the part centered around 2/3 of r + std::set>::iterator itr, itr_p1; + // very ugly anisotropy hack.... dividing recursively smaller and smaller number of cells + + /* uniform division of r in 2^nr_exp - 2^aniso */ + int dummy_lognr = nr_exp; + int n_elems_equi = pow(2, dummy_lognr) - pow(2, anisotropic_factor); + if (anisotropic_factor < 0 || n_elems_equi <= 0) + { + throw std::runtime_error("Please choose anisotropy factor a such that 2^fac_ani < 2^nr_exp.\n"); + } + + if ((anisotropic_factor % 2) == 1) // odd number of elements on an open circular disk is desired because of coarsening + n_elems_equi++; + double uniform_distance = (R - R0) / n_elems_equi; + int nr = n_elems_equi + 1; + std::vector r_temp2 = std::vector(nr); + for (int i = 0; i < nr - 1; i++) + r_temp2[i] = R0 + i * uniform_distance; + r_temp2[nr - 1] = R; + + /* refine around 2/3 of r */ + int n_elems_refined = pow(2, anisotropic_factor); + + // edge + int se; + + // Added by Allan Kuhn to fix a memory error + if (floor(nr * percentage) > nr - (n_elems_refined / 2)) + { + int new_aniso = log2(nr - floor(nr * percentage)) + 1; + n_elems_refined = pow(2, new_aniso); + } + + se = floor(nr * percentage) - n_elems_refined / 2; + int ee = se + n_elems_refined; + // takeout + int st = ceil((double)n_elems_refined / 4.0 + 1) - 1; + int et = floor(3 * ((double)n_elems_refined / 4.0)); + + std::set r_set; + std::set r_set_p1; + int count = 0; + for (int i = 0; i < n_elems_refined; i++) + { + r_set_p1.insert(r_temp2[se + i]); + count++; + } + double half = uniform_distance / 2.0; + for (int k = 0; k < anisotropic_factor; k++) + { + std::set r_set_p1_tmp; + itr_p1 = r_set_p1.begin(); + int r_size = count; + count = 0; + for (int i = 0; i < r_size - 1; i++) + { + r_set.insert((*itr_p1) + half); + if (k < anisotropic_factor - 1 && i >= st && i < et) + { + r_set_p1_tmp.insert(*(itr_p1)); + r_set_p1_tmp.insert(*(itr_p1) + half); + count += 2; + } + itr_p1++; + } + r_set_p1 = r_set_p1_tmp; + half *= 0.5; + } + + // such that the total size is 8*x+1 (or we do not refine) + nr = nr + r_set.size(); + int shift = 0; + shift = std::min(nr % 8 - 1, (int)r_set.size()); + itr = r_set.begin(); + std::advance(itr, shift); + r_set.erase(r_set.begin(), itr); + for (int i = 0; i < n_elems_refined; i++) + r_set.insert(r_temp2[se + i]); + + // group all in r_tmp + nr = n_elems_equi - n_elems_refined + r_set.size() + 1; + + r_temp.resize(nr); + + for (int i = 0; i < se; i++) + r_temp[i] = r_temp2[i]; + itr = r_set.begin(); + for (int i = 0; i < (int)r_set.size(); i++) + { + r_temp[se + i] = *itr; + itr++; + } + for (int i = 0; i < n_elems_equi - ee + 1; i++) + r_temp[se + r_set.size() + i] = r_temp2[ee + i]; +} + +void PolarGrid::allocateDeviceMemory() +{ + if (cudaMalloc(&d_radii_, radii_.size() * sizeof(double)) != cudaSuccess) { + throw std::runtime_error("Failed to allocate device memory for radii."); + } + if (cudaMalloc(&d_angles_, angles_.size() * sizeof(double)) != cudaSuccess) { + throw std::runtime_error("Failed to allocate device memory for angles."); + } + + if (cudaMalloc(&d_radial_spacings_, radial_spacings_.size() * sizeof(double)) != cudaSuccess) { + throw std::runtime_error("Failed to allocate device memory for radial spacings."); + } + if (cudaMalloc(&d_angular_spacings_, angular_spacings_.size() * sizeof(double)) != cudaSuccess) { + throw std::runtime_error("Failed to allocate device memory for angular spacings."); + } +} + +void PolarGrid::copyDataToDevice() +{ + if (cudaMemcpy(d_radii_, radii_.data(), radii_.size() * sizeof(double), cudaMemcpyHostToDevice) != cudaSuccess) { + throw std::runtime_error("Failed to copy radii to device."); + } + if (cudaMemcpy(d_angles_, angles_.data(), angles_.size() * sizeof(double), cudaMemcpyHostToDevice) != cudaSuccess) { + throw std::runtime_error("Failed to copy angles to device."); + } + if (cudaMemcpy(d_radial_spacings_, radial_spacings_.data(), radial_spacings_.size() * sizeof(double), cudaMemcpyHostToDevice) != cudaSuccess) { + throw std::runtime_error("Failed to copy radial spacings to device."); + } + if (cudaMemcpy(d_angular_spacings_, angular_spacings_.data(), angular_spacings_.size() * sizeof(double), cudaMemcpyHostToDevice) != cudaSuccess) { + throw std::runtime_error("Failed to copy angular spacings to device."); + } +} +void PolarGrid::freeDeviceMemory() +{ + if (d_radii_) { + cudaError_t err = cudaFree(d_radii_); + if (err != cudaSuccess) { + std::cerr << "Failed to free device memory for d_radii_: " << cudaGetErrorString(err) << std::endl; + } + d_radii_ = nullptr; + } + + if (d_angles_) { + cudaError_t err = cudaFree(d_angles_); + if (err != cudaSuccess) { + std::cerr << "Failed to free device memory for d_angles_: " << cudaGetErrorString(err) << std::endl; + } + d_angles_ = nullptr; + } + + if (d_radial_spacings_) { + cudaError_t err = cudaFree(d_radial_spacings_); + if (err != cudaSuccess) { + std::cerr << "Failed to free device memory for d_radial_spacings_: " << cudaGetErrorString(err) << std::endl; + } + d_radial_spacings_ = nullptr; + } + + if (d_angular_spacings_) { + cudaError_t err = cudaFree(d_angular_spacings_); + if (err != cudaSuccess) { + std::cerr << "Failed to free device memory for d_angular_spacings_: " << cudaGetErrorString(err) << std::endl; + } + d_angular_spacings_ = nullptr; + } +} + +// ---------------------------------------------------- // +// Generates a coarser PolarGrid from a finer PolarGrid // +// ---------------------------------------------------- // + +PolarGrid coarseningGrid(const PolarGrid& fineGrid) +{ + assert((fineGrid.nr() - 1) % 2 == 0 && (fineGrid.ntheta()) % 2 == 0); + const int coarse_nr = (fineGrid.nr() + 1) / 2; + const int coarse_ntheta = fineGrid.ntheta() / 2; + + std::vector coarse_r(coarse_nr); + std::vector coarse_theta(coarse_ntheta + 1); + + for (int i = 0; i < coarse_nr; i++) + { + coarse_r[i] = fineGrid.radius(2 * i); + } + for (int j = 0; j < coarse_ntheta + 1; j++) + { + coarse_theta[j] = fineGrid.theta(2 * j); + } + + const bool use_same_splitting_radius = false; + + if (use_same_splitting_radius) + { + return PolarGrid(coarse_r, coarse_theta, fineGrid.smootherSplittingRadius()); + } + else + { + return PolarGrid(coarse_r, coarse_theta); + } +} diff --git a/src/RHS.cpp b/src/RHS.cpp deleted file mode 100644 index 109d82fd..00000000 --- a/src/RHS.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -/*! - * \file RHS.cpp - * \brief Implementation of the right hand side - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gyro.h" - -/*! - * \brief Defines the RHS (single) - * - * Defines the RHS on (r, theta) - * - */ -double gyro::eval_def_rhs(double r, double theta, int verbose) -{ - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double rhs_val = 0; - if (r > 0) { - rhs_val = functions->rho_glob(r, theta, kappa_eps, delta_e, Rmax); - } - else { - rhs_val = functions->rho_pole(r, theta, kappa_eps, delta_e, Rmax); - } - if (verbose) { - std::cout << "RHS(" << r << ", " << theta << "): " << rhs_val << "\n"; - } - return rhs_val; -} /* ----- end of gyro::eval_def_rhs ----- */ - -/*! - * \brief Defines the RHS (vector) - * - * Defines the RHS for a whole radius - * - */ -std::vector gyro::eval_def_rhs(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::vector rhs_val(ntheta); - if (r > 0) { - functions->rho_glob(r, theta, kappa_eps, delta_e, Rmax, rhs_val, sin_theta, cos_theta); - } - else { - functions->rho_pole(r, theta, kappa_eps, delta_e, Rmax, rhs_val, sin_theta, cos_theta); - } - if (verbose) { - for (int i = 0; i < ntheta; i++) - std::cout << "RHS(" << r << ", " << theta[i] << "): " << rhs_val[i] << "\n"; - } - return rhs_val; -} /* ----- end of gyro::eval_def_rhs ----- */ diff --git a/src/Residual/ResidualTakeCPU/applyResidual.cpp b/src/Residual/ResidualTakeCPU/applyResidual.cpp new file mode 100644 index 00000000..a13f20cf --- /dev/null +++ b/src/Residual/ResidualTakeCPU/applyResidual.cpp @@ -0,0 +1,175 @@ +#include "../../../include/Residual/ResidualTakeCPU/residual.h" + +#define NODE_APPLY_RESIDUAL_TAKE(i_r, i_theta, grid, DirBC_Interior, result, rhs, x, arr, att, art, detDF, coeff_beta) \ + do { \ + /* -------------------- */ \ + /* Node in the interior */ \ + /* -------------------- */ \ + if (i_r > 0 && i_r < grid.nr() - 1) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + result[center] = \ + rhs[center] - \ + (0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) * x[center] /* beta_{i,j} */ \ + \ + - coeff1 * (arr[center] + arr[left]) * (x[left] - x[center]) /* Left - Center: (Left) */ \ + - coeff2 * (arr[center] + arr[right]) * (x[right] - x[center]) /* Right - Center: (Right) */ \ + - coeff3 * (att[center] + att[bottom]) * (x[bottom] - x[center]) /* Bottom - Center: (Bottom) */ \ + - coeff4 * (att[center] + att[top]) * (x[top] - x[center]) /* Top - Center: (Top) */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + /* -------------------------- */ \ + /* Node on the inner boundary */ \ + /* -------------------------- */ \ + } \ + else if (i_r == 0) { \ + /* ------------------------------------------------ */ \ + /* Case 1: Dirichlet boundary on the inner boundary */ \ + /* ------------------------------------------------ */ \ + if (DirBC_Interior) { \ + const int center = grid.index(i_r, i_theta); \ + result[center] = rhs[center] - x[center]; \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + double h1 = 2.0 * grid.radius(0); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid_.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid_.wrapThetaIndex(i_theta + 1); \ + const int i_theta_Across = grid_.wrapThetaIndex(i_theta + grid_.ntheta() / 2); \ + \ + const int left = grid_.index(i_r, i_theta_Across); \ + const int bottom = grid_.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid_.index(i_r, i_theta_P1); \ + const int bottom_right = grid_.index(i_r + 1, i_theta_M1); \ + const int right = grid_.index(i_r + 1, i_theta); \ + const int top_right = grid_.index(i_r + 1, i_theta_P1); \ + \ + result[center] = \ + rhs[center] - \ + (0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) * x[center] /* beta_{i,j} */ \ + \ + - coeff1 * (arr[center] + arr[left]) * (x[left] - x[center]) /* Left - Center: (Left) */ \ + - coeff2 * (arr[center] + arr[right]) * (x[right] - x[center]) /* Right - Center: (Right) */ \ + - coeff3 * (att[center] + att[bottom]) * (x[bottom] - x[center]) /* Bottom - Center: (Bottom) */ \ + - coeff4 * (att[center] + att[top]) * (x[top] - x[center]) /* Top - Center: (Top) */ \ + \ + /* - 0.25 * (art[left] + art[bottom]) * x[bottom_left] // Bottom Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + + \ + 0.25 * (art[right] + art[bottom]) * \ + x[bottom_right] /* Bottom Right */ /* + 0.25 * (art[left] + art[top]) * x[top_left] // Top Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + /* ----------------------------- */ \ + /* Node on to the outer boundary */ \ + /* ----------------------------- */ \ + } \ + else if (i_r == grid.nr() - 1) { \ + /* Fill result of (i,j) */ \ + const int center = grid.index(i_r, i_theta); \ + result[center] = rhs[center] - x[center]; \ + } \ + } while (0) + +void ResidualTakeCPU::applyCircleSection(const int i_r, Vector& result, const Vector& rhs, + const Vector& x) const +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + NODE_APPLY_RESIDUAL_TAKE(i_r, i_theta, grid_, DirBC_Interior_, result, rhs, x, arr, att, art, detDF, + coeff_beta); + } +} + +void ResidualTakeCPU::applyRadialSection(const int i_theta, Vector& result, const Vector& rhs, + const Vector& x) const +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + NODE_APPLY_RESIDUAL_TAKE(i_r, i_theta, grid_, DirBC_Interior_, result, rhs, x, arr, att, art, detDF, + coeff_beta); + } +} + +/* ------------------ */ +/* result = rhs - A*x */ +void ResidualTakeCPU::computeResidual(Vector& result, const Vector& rhs, const Vector& x) const +{ + assert(result.size() == x.size()); + + if (omp_get_max_threads() == 1) { + /* Single-threaded execution */ + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + applyCircleSection(i_r, result, rhs, x); + } + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + applyRadialSection(i_theta, result, rhs, x); + } + } + else { +/* Multi-threaded execution */ +#pragma omp parallel + { +/* Circle Section */ +#pragma omp for nowait + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + applyCircleSection(i_r, result, rhs, x); + } +/* Radial Section */ +#pragma omp for nowait + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + applyRadialSection(i_theta, result, rhs, x); + } + } + } +} \ No newline at end of file diff --git a/src/Residual/ResidualTakeCPU/residual.cpp b/src/Residual/ResidualTakeCPU/residual.cpp new file mode 100644 index 00000000..1face841 --- /dev/null +++ b/src/Residual/ResidualTakeCPU/residual.cpp @@ -0,0 +1,11 @@ +#include "../../../include/Residual/ResidualTakeCPU/residual.h" + +ResidualTakeCPU::ResidualTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, bool DirBC_Interior) + : grid_(level.grid()) + , level_cache_(level.levelCache()) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) +{ +} diff --git a/src/Residual/ResidualTakeGPU/applyResidual.cu b/src/Residual/ResidualTakeGPU/applyResidual.cu new file mode 100644 index 00000000..aae017bc --- /dev/null +++ b/src/Residual/ResidualTakeGPU/applyResidual.cu @@ -0,0 +1,172 @@ +#include "../../include/Residual/ResidualTakeGPU/residual.h" + +__global__ void applyResidual_kernel( + double* result, double* rhs, double* x, + PolarGrid* grid, bool DirBC_Interior, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = DirBC_Interior ? 0 : -1; + const int max_i_r = grid->nr() - 1; + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_x[16][16 + 1]; + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + __shared__ double s_art[16][16 + 1]; + + /* Local (shared memory) thread indices. */ + const int s_i_r = threadIdx.x; + const int s_i_theta = threadIdx.y; + + /* Load x value into shared memory. */ + const int center_index = grid->index(i_r, i_theta); + s_x[s_i_r][s_i_theta] = x[center_index]; + + /* Compute Jacobian on current node */ + const double r = grid->radius(i_r); + const double theta = grid->theta(i_theta); + + const double sin_theta = sin_theta_cache[i_theta]; + const double cos_theta = cos_theta_cache[i_theta]; + + const double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + const double coeff_alpha = coeff_alpha_cache[i_r]; + + const double detDF = Jrr * Jtt - Jrt * Jtr; + const double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + const double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + const double art = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + s_art[s_i_r][s_i_theta] = art; + + __syncthreads(); + + /* Node lies outside of the grid. */ + if (global_i_r < 0 || global_i_r >= grid->nr() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if (s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Compute neighbor distances */ + bool isOnInnerBoundary = (i_r == 0); + bool isOnOuterBoundary = (i_r == grid->nr() - 1); + + double h1 = DirBC_Interior ? + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 0.0) : + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 2.0 * grid->radius(0)); + double h2 = (!isOnOuterBoundary) ? grid->radialSpacing(i_r) : 0.0; + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + double coeff1 = (h1 != 0.0) ? 0.5 * (k1 + k2) / h1 : 0.0; + double coeff2 = (h2 != 0.0) ? 0.5 * (k1 + k2) / h2 : 0.0; + double coeff3 = (k1 != 0.0) ? 0.5 * (h1 + h2) / k1 : 0.0; + double coeff4 = (k2 != 0.0) ? 0.5 * (h1 + h2) / k2 : 0.0; + + if (!isOnInnerBoundary && !isOnOuterBoundary) { + result[center_index] = rhs[center_index] - + + (0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) * s_x[s_i_r][s_i_theta] /* beta_{i,j} */ + + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * (s_x[s_i_r-1][s_i_theta] - s_x[s_i_r][s_i_theta]) /* Left - Center: (Left) */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * (s_x[s_i_r+1][s_i_theta] - s_x[s_i_r][s_i_theta]) /* Right - Center: (Right) */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * (s_x[s_i_r][s_i_theta-1] - s_x[s_i_r][s_i_theta]) /* Bottom - Center: (Bottom) */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * (s_x[s_i_r][s_i_theta+1] - s_x[s_i_r][s_i_theta]) /* Top - Center: (Top) */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else if((isOnInnerBoundary && !DirBC_Interior)){ + result[center_index] = rhs[center_index] - + + (0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) * s_x[s_i_r][s_i_theta] /* beta_{i,j} */ + + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * (s_x[s_i_r-1][s_i_theta] - s_x[s_i_r][s_i_theta]) /* Left - Center: (Left) */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * (s_x[s_i_r+1][s_i_theta] - s_x[s_i_r][s_i_theta]) /* Right - Center: (Right) */ + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * (s_x[s_i_r][s_i_theta-1] - s_x[s_i_r][s_i_theta]) /* Bottom - Center: (Bottom) */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * (s_x[s_i_r][s_i_theta+1] - s_x[s_i_r][s_i_theta]) /* Top - Center: (Top) */ + + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + + } + else if((isOnInnerBoundary && DirBC_Interior) || isOnOuterBoundary){ + result[center_index] = rhs[center_index] - s_x[s_i_r][s_i_theta]; + } +} + + +/* ------------------ */ +/* result = rhs - A*x */ +void ResidualTakeGPU::computeResidual(GPU_Vector& result, const GPU_Vector& rhs, const GPU_Vector& x) const { + + const PolarGrid& grid = level_.grid(); + + assert(result.size() == grid.numberOfNodes()); + assert(rhs.size() == grid.numberOfNodes()); + assert(x.size() == grid.numberOfNodes()); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, &domain_geometry_, sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + /* We use precomputed DensityProfileCoefficients values. */ + // DensityProfileCoefficients* device_density_profile; + // cudaMalloc(&device_density_profile, sizeof(DensityProfileCoefficients)); + // cudaMemcpy(device_density_profile, &density_profile_coefficients_, sizeof(DensityProfileCoefficients), cudaMemcpyHostToDevice); + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + 14 - 1) / 14, + (grid.ntheta() + 14 - 1) / 14); + + applyResidual_kernel<<>>( + result.data(), rhs.data(), x.data(), + level_.device_grid(), DirBC_Interior_, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + + cudaDeviceSynchronize(); + + /* We use precomputed DensityProfileCoefficients values. */ + cudaFree(device_domain_geometry); + // cudaFree(device_density_profile); +} diff --git a/src/Residual/ResidualTakeGPU/residual.cpp b/src/Residual/ResidualTakeGPU/residual.cpp new file mode 100644 index 00000000..2d52a7f7 --- /dev/null +++ b/src/Residual/ResidualTakeGPU/residual.cpp @@ -0,0 +1,12 @@ +#include "../../include/Residual/ResidualTakeGPU/residual.h" + +ResidualTakeGPU::ResidualTakeGPU( + const Level& level, + const DomainGeometry& domain_geometry, const DensityProfileCoefficients& density_profile_coefficients, + bool DirBC_Interior +) : + level_(level), + domain_geometry_(domain_geometry), + density_profile_coefficients_(density_profile_coefficients), + DirBC_Interior_(DirBC_Interior) +{} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeCPU/applySmoothing.cpp b/src/Smoother/SmootherTakeCPU/applySmoothing.cpp new file mode 100644 index 00000000..973c76d5 --- /dev/null +++ b/src/Smoother/SmootherTakeCPU/applySmoothing.cpp @@ -0,0 +1,317 @@ +#include "../../../include/Smoother/SmootherTakeCPU/smoother.h" + +#define NODE_APPLY_ASC_ORTHO_CIRCLE_TAKE(i_r, i_theta, grid, DirBC_Interior, smoother_color, x, rhs, temp, arr, att, \ + art, detDF, coeff_beta) \ + do { \ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); \ + \ + if (i_r > 0 && i_r < grid.numberSmootherCircles()) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + temp[center] = rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else if (i_r == 0) { \ + if (DirBC_Interior) { \ + const int center = grid.index(i_r, i_theta); \ + temp[center] = rhs[center]; \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + double h1 = 2.0 * grid.radius(0); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid_.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid_.wrapThetaIndex(i_theta + 1); \ + const int i_theta_Across = grid_.wrapThetaIndex(i_theta + grid_.ntheta() / 2); \ + \ + const int left = grid_.index(i_r, i_theta_Across); \ + const int bottom = grid_.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid_.index(i_r, i_theta_P1); \ + const int bottom_right = grid_.index(i_r + 1, i_theta_M1); \ + const int right = grid_.index(i_r + 1, i_theta); \ + const int top_right = grid_.index(i_r + 1, i_theta_P1); \ + \ + temp[center] = \ + rhs[center] - \ + (-coeff2 * (arr[center] + arr[right]) * x[right] /* Right */ \ + \ + /* - 0.25 * (art[left] + art[bottom]) * x[bottom_left] // Bottom Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + + \ + 0.25 * (art[right] + art[bottom]) * \ + x[bottom_right] /* Bottom Right */ /* + 0.25 * (art[left] + art[top]) * x[top_left] // Top Left: REMOVED DUE TO ARTIFICAL 7 POINT STENCIL */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + } \ + } while (0) + +#define NODE_APPLY_ASC_ORTHO_RADIAL_TAKE(i_r, i_theta, grid, DirBC_Interior, smoother_color, x, rhs, temp, arr, att, \ + art, detDF, coeff_beta) \ + do { \ + assert(i_r >= grid.numberSmootherCircles() && i_r < grid.nr()); \ + /* -------------------- */ \ + /* Node in the interior */ \ + /* -------------------- */ \ + if (i_r > grid.numberSmootherCircles() && i_r < grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + temp[center] = rhs[center] - (-coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else if (i_r == grid.numberSmootherCircles()) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + temp[center] = rhs[center] - (-coeff1 * (arr[center] + arr[left]) * x[left] /* Left */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else if (i_r == grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int bottom_left = grid.index(i_r - 1, i_theta_M1); \ + const int left = grid.index(i_r - 1, i_theta); \ + const int top_left = grid.index(i_r - 1, i_theta_P1); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int bottom_right = grid.index(i_r + 1, i_theta_M1); \ + const int right = grid.index(i_r + 1, i_theta); \ + const int top_right = grid.index(i_r + 1, i_theta_P1); \ + \ + temp[center] = \ + rhs[center] - \ + (/* "Right" is part of the radial Asc smoother matrices, */ \ + /* but is shifted over to the rhs to make the radial Asc smoother matrices symmetric. */ /* Note that the circle Asc smoother matrices are symmetric by default. */ \ + -coeff2 * (arr[center] + arr[right]) * rhs[right] /* Right */ \ + - coeff3 * (att[center] + att[bottom]) * x[bottom] /* Bottom */ \ + - coeff4 * (att[center] + att[top]) * x[top] /* Top */ \ + \ + - 0.25 * (art[left] + art[bottom]) * x[bottom_left] /* Bottom Left */ \ + + 0.25 * (art[right] + art[bottom]) * x[bottom_right] /* Bottom Right */ \ + + 0.25 * (art[left] + art[top]) * x[top_left] /* Top Left */ \ + - 0.25 * (art[right] + art[top]) * x[top_right] /* Top Right */ \ + ); \ + } \ + else if (i_r == grid.nr() - 1) { \ + const int center = grid.index(i_r, i_theta); \ + temp[center] = rhs[center]; \ + } \ + } while (0) + +void SmootherTakeCPU::applyAscOrthoCircleSection(const int i_r, const SmootherColor smoother_color, + const Vector& x, const Vector& rhs, Vector& temp) +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + NODE_APPLY_ASC_ORTHO_CIRCLE_TAKE(i_r, i_theta, grid_, DirBC_Interior_, smoother_color, x, rhs, temp, arr, att, + art, detDF, coeff_beta); + } +} + +void SmootherTakeCPU::applyAscOrthoRadialSection(const int i_theta, const SmootherColor smoother_color, + const Vector& x, const Vector& rhs, Vector& temp) +{ + assert(i_theta >= 0 && i_theta < grid_.ntheta()); + + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + NODE_APPLY_ASC_ORTHO_RADIAL_TAKE(i_r, i_theta, grid_, DirBC_Interior_, smoother_color, x, rhs, temp, arr, att, + art, detDF, coeff_beta); + } +} + +void SmootherTakeCPU::solveCircleSection(const int i_r, Vector& x, Vector& temp, + Vector& solver_storage_1, Vector& solver_storage_2) +{ + const int start = grid_.index(i_r, 0); + const int end = start + grid_.ntheta(); + if (i_r == 0) { + inner_boundary_mumps_solver_.job = JOB_COMPUTE_SOLUTION; + inner_boundary_mumps_solver_.nrhs = 1; // single rhs vector + inner_boundary_mumps_solver_.nz_rhs = grid_.ntheta(); // non-zeros in rhs + inner_boundary_mumps_solver_.rhs = temp.begin() + start; + inner_boundary_mumps_solver_.lrhs = grid_.ntheta(); // leading dimension of rhs + dmumps_c(&inner_boundary_mumps_solver_); + if (inner_boundary_mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the system: " << inner_boundary_mumps_solver_.info[0] << std::endl; + } + } + else { + circle_tridiagonal_solver_[i_r].solveInPlace(temp.begin() + start, solver_storage_1.begin(), solver_storage_2.begin()); + } + // Move updated values to x + std::move(temp.begin() + start, temp.begin() + end, x.begin() + start); +} + +void SmootherTakeCPU::solveRadialSection(const int i_theta, Vector& x, Vector& temp, + Vector& solver_storage) +{ + const int start = grid_.index(grid_.numberSmootherCircles(), i_theta); + const int end = start + grid_.lengthSmootherRadial(); + + radial_tridiagonal_solver_[i_theta].solveInPlace(temp.begin() + start, solver_storage.begin()); + // Move updated values to x + std::move(temp.begin() + start, temp.begin() + end, x.begin() + start); +} + +void SmootherTakeCPU::smoothingInPlace(Vector& x, const Vector& rhs, Vector& temp) +{ + assert(x.size() == rhs.size()); + assert(temp.size() == rhs.size()); + +#pragma omp parallel + { + Vector circle_solver_storage_1(grid_.ntheta()); + Vector circle_solver_storage_2(grid_.ntheta()); + Vector radial_solver_storage(grid_.lengthSmootherRadial()); + + /* The outer most circle next to the radial section is defined to be black. */ + /* Priority: Black -> White. */ + const int start_black_circles = (grid_.numberSmootherCircles() % 2 == 0) ? 1 : 0; + const int start_white_circles = (grid_.numberSmootherCircles() % 2 == 0) ? 0 : 1; + +/* Black Circle Section */ +#pragma omp for + for (int i_r = start_black_circles; i_r < grid_.numberSmootherCircles(); i_r += 2) { + applyAscOrthoCircleSection(i_r, SmootherColor::Black, x, rhs, temp); + solveCircleSection(i_r, x, temp, circle_solver_storage_1, circle_solver_storage_2); + } /* Implicit barrier */ + +/* White Circle Section */ +#pragma omp for nowait + for (int i_r = start_white_circles; i_r < grid_.numberSmootherCircles(); i_r += 2) { + applyAscOrthoCircleSection(i_r, SmootherColor::White, x, rhs, temp); + solveCircleSection(i_r, x, temp, circle_solver_storage_1, circle_solver_storage_2); + } +/* Black Radial Section */ +#pragma omp for + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta += 2) { + applyAscOrthoRadialSection(i_theta, SmootherColor::Black, x, rhs, temp); + solveRadialSection(i_theta, x, temp, radial_solver_storage); + } /* Implicit barrier */ + +/* White Radial Section*/ +#pragma omp for + for (int i_theta = 1; i_theta < grid_.ntheta(); i_theta += 2) { + applyAscOrthoRadialSection(i_theta, SmootherColor::White, x, rhs, temp); + solveRadialSection(i_theta, x, temp, radial_solver_storage); + } /* Implicit barrier */ + } +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeCPU/buildMatrix.cpp b/src/Smoother/SmootherTakeCPU/buildMatrix.cpp new file mode 100644 index 00000000..6ef5b395 --- /dev/null +++ b/src/Smoother/SmootherTakeCPU/buildMatrix.cpp @@ -0,0 +1,499 @@ +#include "../../../include/Smoother/SmootherTakeCPU/smoother.h" + +#define NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid, DirBC_Interior, inner_boundary_circle_matrix, \ + circle_tridiagonal_solver, radial_tridiagonal_solver) \ + do { \ + assert(i_r >= 0 && i_r < grid.nr()); \ + assert(i_theta >= 0 && i_theta < grid.ntheta()); \ + \ + const int numberSmootherCircles = grid.numberSmootherCircles(); \ + const int lengthSmootherRadial = grid.lengthSmootherRadial(); \ + \ + assert(numberSmootherCircles >= 2); \ + assert(lengthSmootherRadial >= 3); \ + \ + int row, column; \ + double value; \ + /* ------------------------------------------ */ \ + /* Node in the interior of the Circle Section */ \ + /* ------------------------------------------ */ \ + if (i_r > 0 && i_r < numberSmootherCircles) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = circle_tridiagonal_solver[i_r]; \ + const int center_index = i_theta; \ + const int bottom_index = i_theta_M1; \ + const int top_index = i_theta_P1; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Bottom */ \ + row = center_index; \ + column = bottom_index; \ + value = -coeff3 * (att[center] + att[bottom]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Top */ \ + row = center_index; \ + column = top_index; \ + value = -coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ------------------------------------------ */ \ + /* Node in the interior of the Radial Section */ \ + /* ------------------------------------------ */ \ + else if (i_r > numberSmootherCircles && i_r < grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta]; \ + const int center_index = i_r - numberSmootherCircles; \ + const int left_index = i_r - numberSmootherCircles - 1; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Left */ \ + row = center_index; \ + column = left_index; \ + value = -coeff1 * (arr[center] + arr[left]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = -coeff2 * (arr[center] + arr[right]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ------------------------------------------ */ \ + /* Circle Section: Node in the inner boundary */ \ + /* ------------------------------------------ */ \ + else if (i_r == 0) { \ + /* ------------------------------------------------ */ \ + /* Case 1: Dirichlet boundary on the inner boundary */ \ + /* ------------------------------------------------ */ \ + if (DirBC_Interior) { \ + auto& matrix = inner_boundary_circle_matrix; \ + const int center_index = i_theta; \ + \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + const int center_nz_index = getCircleAscIndex(i_r, i_theta); \ + const int nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = center_index + 1; \ + matrix.value(nz_index) = 1.0; \ + } \ + else { \ + /* ------------------------------------------------------------- */ \ + /* Case 2: Across origin discretization on the interior boundary */ \ + /* ------------------------------------------------------------- */ \ + /* h1 gets replaced with 2 * R0. */ \ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ \ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ \ + const double h1 = 2.0 * grid.radius(0); \ + const double h2 = grid.radialSpacing(i_r); \ + const double k1 = grid.angularSpacing(i_theta - 1); \ + const double k2 = grid.angularSpacing(i_theta); \ + \ + const double coeff1 = 0.5 * (k1 + k2) / h1; \ + const double coeff2 = 0.5 * (k1 + k2) / h2; \ + const double coeff3 = 0.5 * (h1 + h2) / k1; \ + const double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + const int i_theta_AcrossOrigin = grid.wrapThetaIndex(i_theta + grid.ntheta() / 2); \ + \ + const int left = grid.index(i_r, i_theta_AcrossOrigin); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = inner_boundary_circle_matrix; \ + \ + const int center_index = i_theta; \ + const int left_index = i_theta_AcrossOrigin; \ + const int bottom_index = i_theta_M1; \ + const int top_index = i_theta_P1; \ + \ + const int center_nz_index = getCircleAscIndex(i_r, i_theta); \ + \ + int nz_index; \ + /* Fill matrix row of (i,j) */ \ + const Stencil& CenterStencil = getStencil(i_r); \ + \ + const double center_value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + const double left_value = -coeff1 * (arr[center] + arr[left]); \ + const double bottom_value = -coeff3 * (att[center] + att[bottom]); \ + const double top_value = -coeff4 * (att[center] + att[top]); \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Center]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = center_index + 1; \ + matrix.value(nz_index) = center_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Left]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = left_index + 1; \ + matrix.value(nz_index) = left_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Bottom]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = bottom_index + 1; \ + matrix.value(nz_index) = bottom_value; \ + \ + nz_index = center_nz_index + CenterStencil[StencilType::Top]; \ + matrix.row_index(nz_index) = center_index + 1; \ + matrix.col_index(nz_index) = top_index + 1; \ + matrix.value(nz_index) = top_value; \ + } \ + } \ + /* --------------------------------------------- */ \ + /* Radial Section: Node next to circular section */ \ + /* --------------------------------------------- */ \ + else if (i_r == numberSmootherCircles) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta]; \ + const int center_index = i_r - numberSmootherCircles; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = -coeff2 * (arr[center] + arr[right]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ------------------------------------------- */ \ + /* Radial Section: Node next to outer boundary */ \ + /* ------------------------------------------- */ \ + else if (i_r == grid.nr() - 2) { \ + double h1 = grid.radialSpacing(i_r - 1); \ + double h2 = grid.radialSpacing(i_r); \ + double k1 = grid.angularSpacing(i_theta - 1); \ + double k2 = grid.angularSpacing(i_theta); \ + \ + double coeff1 = 0.5 * (k1 + k2) / h1; \ + double coeff2 = 0.5 * (k1 + k2) / h2; \ + double coeff3 = 0.5 * (h1 + h2) / k1; \ + double coeff4 = 0.5 * (h1 + h2) / k2; \ + \ + const int i_theta_M1 = grid.wrapThetaIndex(i_theta - 1); \ + const int i_theta_P1 = grid.wrapThetaIndex(i_theta + 1); \ + \ + const int left = grid.index(i_r - 1, i_theta); \ + const int bottom = grid.index(i_r, i_theta_M1); \ + const int center = grid.index(i_r, i_theta); \ + const int top = grid.index(i_r, i_theta_P1); \ + const int right = grid.index(i_r + 1, i_theta); \ + \ + auto& matrix = radial_tridiagonal_solver[i_theta]; \ + const int center_index = i_r - numberSmootherCircles; \ + const int left_index = i_r - numberSmootherCircles - 1; \ + const int right_index = i_r - numberSmootherCircles + 1; \ + \ + /* Center: (Left, Right, Bottom, Top) */ \ + row = center_index; \ + column = center_index; \ + value = 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta[i_r] * fabs(detDF[center]) + \ + coeff1 * (arr[center] + arr[left]) + coeff2 * (arr[center] + arr[right]) + \ + coeff3 * (att[center] + att[bottom]) + coeff4 * (att[center] + att[top]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Left */ \ + row = center_index; \ + column = left_index; \ + value = -coeff1 * (arr[center] + arr[left]); \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Right */ \ + row = center_index; \ + column = right_index; \ + value = 0.0; \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + /* ------------------------------------------ */ \ + /* Radial Section: Node on the outer boundary */ \ + /* ------------------------------------------ */ \ + else if (i_r == grid.nr() - 1) { \ + auto& matrix = radial_tridiagonal_solver[i_theta]; \ + const int center_index = i_r - numberSmootherCircles; \ + const int left_index = i_r - numberSmootherCircles - 1; \ + \ + /* Fill matrix row of (i,j) */ \ + row = center_index; \ + column = center_index; \ + value = 1.0; \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + \ + /* Left */ \ + row = center_index; \ + column = left_index; \ + value = 0.0; \ + if (row == column) \ + matrix.main_diagonal(row) = value; \ + else if (row == column - 1) \ + matrix.sub_diagonal(row) = value; \ + else if (row == 0 && column == matrix.columns() - 1) \ + matrix.cyclic_corner_element() = value; \ + } \ + } while (0) + + +void SmootherTakeCPU::buildAscCircleSection(const int i_r) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + // Build Asc at the current node + NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid_, DirBC_Interior_, inner_boundary_circle_matrix_, + circle_tridiagonal_solver_, radial_tridiagonal_solver_); + } +} + +void SmootherTakeCPU::buildAscRadialSection(const int i_theta) +{ + const auto& arr = level_cache_.arr(); + const auto& att = level_cache_.att(); + const auto& art = level_cache_.art(); + const auto& detDF = level_cache_.detDF(); + const auto& coeff_beta = level_cache_.coeff_beta(); + + for (int i_r = grid_.numberSmootherCircles(); i_r < grid_.nr(); i_r++) { + // Build Asc at the current node + NODE_BUILD_SMOOTHER_TAKE(i_r, i_theta, grid_, DirBC_Interior_, inner_boundary_circle_matrix_, + circle_tridiagonal_solver_, radial_tridiagonal_solver_); + } +} + +void SmootherTakeCPU::buildAscMatrices() +{ + /* -------------------------------------- */ + /* Part 1: Allocate Asc Smoother matrices */ + /* -------------------------------------- */ + + const int number_smoother_circles = grid_.numberSmootherCircles(); + const int length_smoother_radial = grid_.lengthSmootherRadial(); + + const int num_circle_nodes = grid_.ntheta(); + circle_tridiagonal_solver_.resize(number_smoother_circles); + + const int num_radial_nodes = length_smoother_radial; + radial_tridiagonal_solver_.resize(grid_.ntheta()); + +// Remark: circle_tridiagonal_solver_[0] is unitialized. +// Please use inner_boundary_circle_matrix_ instead! +#pragma omp parallel if (grid_.numberOfNodes() > 10'000) + { +// ---------------- // +// Circular Section // +#pragma omp for nowait + for (int circle_Asc_index = 0; circle_Asc_index < number_smoother_circles; circle_Asc_index++) { + + /* Inner boundary circle */ + if (circle_Asc_index == 0) { + // Although the matrix is symmetric, we need to store all its entries, so we disable the symmetry. + const int nnz = getNonZeroCountCircleAsc(circle_Asc_index); + inner_boundary_circle_matrix_ = SparseMatrix(num_circle_nodes, num_circle_nodes, nnz); + inner_boundary_circle_matrix_.is_symmetric(false); + } + + /* Interior Circle Section */ + else { + auto& solverMatrix = circle_tridiagonal_solver_[circle_Asc_index]; + solverMatrix = SymmetricTridiagonalSolver(num_circle_nodes); + solverMatrix.is_cyclic(true); + } + } + +// -------------- // +// Radial Section // +#pragma omp for nowait + for (int radial_Asc_index = 0; radial_Asc_index < grid_.ntheta(); radial_Asc_index++) { + auto& solverMatrix = radial_tridiagonal_solver_[radial_Asc_index]; + solverMatrix = SymmetricTridiagonalSolver(num_radial_nodes); + solverMatrix.is_cyclic(false); + } + } + + /* ---------------------------------- */ + /* Part 2: Fill Asc Smoother matrices */ + /* ---------------------------------- */ + +#pragma omp parallel + { +#pragma omp for nowait + for (int i_r = 0; i_r < grid_.numberSmootherCircles(); i_r++) { + buildAscCircleSection(i_r); + } + +#pragma omp for nowait + for (int i_theta = 0; i_theta < grid_.ntheta(); i_theta++) { + buildAscRadialSection(i_theta); + } + } + + /* ------------------------------------------------------------------ */ + /* Part 3: Convert inner_boundary_circle_matrix to a symmetric matrix */ + /* ------------------------------------------------------------------ */ + + SparseMatrix full_matrix = std::move(inner_boundary_circle_matrix_); + + const int nnz = full_matrix.non_zero_size(); + const int numRows = full_matrix.rows(); + const int numColumns = full_matrix.columns(); + const int symmetric_nnz = nnz - (nnz - numRows) / 2; + + inner_boundary_circle_matrix_ = SparseMatrix(numRows, numColumns, symmetric_nnz); + inner_boundary_circle_matrix_.is_symmetric(true); + + int current_nz = 0; + for (int nz_index = 0; nz_index < full_matrix.non_zero_size(); nz_index++) { + int current_row = full_matrix.row_index(nz_index); + int current_col = full_matrix.col_index(nz_index); + if (current_row <= current_col) { + inner_boundary_circle_matrix_.row_index(current_nz) = current_row; + inner_boundary_circle_matrix_.col_index(current_nz) = current_col; + inner_boundary_circle_matrix_.value(current_nz) = std::move(full_matrix.value(nz_index)); + current_nz++; + } + } +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeCPU/initilializeMumps.cpp b/src/Smoother/SmootherTakeCPU/initilializeMumps.cpp new file mode 100644 index 00000000..1bf70e6b --- /dev/null +++ b/src/Smoother/SmootherTakeCPU/initilializeMumps.cpp @@ -0,0 +1,98 @@ +#include "../../../include/Smoother/SmootherTakeCPU/smoother.h" + +void SmootherTakeCPU::initializeMumpsSolver(DMUMPS_STRUC_C& mumps_solver, const SparseMatrix& solver_matrix) +{ + mumps_solver.job = JOB_INIT; + mumps_solver.par = PAR_PARALLEL; + /* The matrix is positive definite for invertible mappings. */ + /* Therefore we use SYM_POSITIVE_DEFINITE instead of SYM_GENERAL_SYMMETRIC. */ + mumps_solver.sym = (solver_matrix.is_symmetric() ? SYM_POSITIVE_DEFINITE : SYM_UNSYMMETRIC); + mumps_solver.comm_fortran = USE_COMM_WORLD; + dmumps_c(&mumps_solver); + + mumps_solver.ICNTL(1) = 0; // Output stream for error messages. + mumps_solver.ICNTL(2) = 0; // Output stream for diagnostic printing and statistics local to each MPI process. + mumps_solver.ICNTL(3) = 0; // Output stream for global information, collected on the host + mumps_solver.ICNTL(4) = 0; // Level of printing for error, warning, and diagnostic messages. + mumps_solver.ICNTL(5) = 0; // Controls the matrix input format + mumps_solver.ICNTL(6) = 7; // Permutes the matrix to a zero-free diagonal and/or scale the matrix + mumps_solver.ICNTL(7) = + 5; // Computes a symmetric permutation (ordering) to determine the pivot order to be used for the + // factorization in case of sequential analysis + mumps_solver.ICNTL(8) = 77; // Describes the scaling strategy + mumps_solver.ICNTL(9) = 1; // Computes the solution using A or A^T + mumps_solver.ICNTL(10) = 0; // Applies the iterative refinement to the computed solution + mumps_solver.ICNTL(11) = 0; // Computes statistics related to an error analysis of the linear system solved + mumps_solver.ICNTL(12) = 0; // Defines an ordering strategy for symmetric matrices and is used + mumps_solver.ICNTL(13) = 0; // Controls the parallelism of the root node + mumps_solver.ICNTL(14) = // Controls the percentage increase in the estimated working space + (solver_matrix.is_symmetric() ? 5 : 20); + mumps_solver.ICNTL(15) = 0; // Exploits compression of the input matrix resulting from a block format + mumps_solver.ICNTL(16) = 0; // Controls the setting of the number of OpenMP threads + // ICNTL(17) Doesn't exist + mumps_solver.ICNTL(18) = 0; // Defines the strategy for the distributed input matrix + mumps_solver.ICNTL(19) = 0; // Computes the Schur complement matrix + mumps_solver.ICNTL(20) = 0; // Determines the format (dense, sparse, or distributed) of the right-hand sides + mumps_solver.ICNTL(21) = 0; // Determines the distribution (centralized or distributed) of the solution vectors. + mumps_solver.ICNTL(22) = 0; // Controls the in-core/out-of-core (OOC) factorization and solve. + mumps_solver.ICNTL(23) = 0; // Corresponds to the maximum size of the working memory in MegaBytes that MUMPS can + // allocate per working process + mumps_solver.ICNTL(24) = 0; // Controls the detection of “null pivot rows”. + mumps_solver.ICNTL(25) = + 0; // Allows the computation of a solution of a deficient matrix and also of a null space basis + mumps_solver.ICNTL(26) = 0; // Drives the solution phase if a Schur complement matrix has been computed + mumps_solver.ICNTL(27) = -32; // Controls the blocking size for multiple right-hand sides. + mumps_solver.ICNTL(28) = 0; // Determines whether a sequential or parallel computation of the ordering is performed + mumps_solver.ICNTL(29) = + 0; // Defines the parallel ordering tool (when ICNTL(28)=1) to be used to compute the fill-in reducing permutation. + mumps_solver.ICNTL(30) = 0; // Computes a user-specified set of entries in the inverse A^−1 of the original matrix + mumps_solver.ICNTL(31) = 0; // Indicates which factors may be discarded during the factorization. + mumps_solver.ICNTL(32) = 0; // Performs the forward elimination of the right-hand sides during the factorization + mumps_solver.ICNTL(33) = 0; // Computes the determinant of the input matrix. + mumps_solver.ICNTL(34) = 0; // Controls the conservation of the OOC files during JOB= –3 + mumps_solver.ICNTL(35) = 0; // Controls the activation of the BLR feature + mumps_solver.ICNTL(36) = 0; // Controls the choice of BLR factorization variant + mumps_solver.ICNTL(37) = 0; // Controls the BLR compression of the contribution blocks + mumps_solver.ICNTL(38) = 600; // Estimates compression rate of LU factors + mumps_solver.ICNTL(39) = 500; // Estimates compression rate of contribution blocks + // ICNTL(40-47) Don't exist + mumps_solver.ICNTL(48) = 1; // Multithreading with tree parallelism + mumps_solver.ICNTL(49) = 0; // Compact workarray id%S at the end of factorization phase + // ICNTL(50-55) Don't exist + mumps_solver.ICNTL(56) = + 0; // Detects pseudo-singularities during factorization and factorizes the root node with a rankrevealing method + // ICNTL(57) Doesn't exist + mumps_solver.ICNTL(58) = 2; // Defines options for symbolic factorization + // ICNTL(59-60) Don't exist + + mumps_solver.CNTL(1) = -1.0; // Relative threshold for numerical pivoting + mumps_solver.CNTL(2) = -1.0; // Stopping criterion for iterative refinement + mumps_solver.CNTL(3) = 0.0; // Determine null pivot rows + mumps_solver.CNTL(4) = -1.0; // Determines the threshold for static pivoting + mumps_solver.CNTL(5) = + 0.0; // Defines the fixation for null pivots and is effective only when null pivot row detection is active + // CNTL(6) Doesn't exist + mumps_solver.CNTL(7) = 0.0; // Defines the precision of the dropping parameter used during BLR compression + // CNTL(8-15) Don't exist + + mumps_solver.job = JOB_ANALYSIS_AND_FACTORIZATION; + assert(solver_matrix.rows() == solver_matrix.columns()); + mumps_solver.n = solver_matrix.rows(); + mumps_solver.nz = solver_matrix.non_zero_size(); + mumps_solver.irn = solver_matrix.row_indices_data(); + mumps_solver.jcn = solver_matrix.column_indices_data(); + mumps_solver.a = solver_matrix.values_data(); + dmumps_c(&mumps_solver); + + if (mumps_solver.sym == SYM_POSITIVE_DEFINITE && mumps_solver.INFOG(12) != 0) { + std::cout << "Warning: Smoother inner boundary matrix is not positive definite: Negative pivots in the " + "factorization phase." + << std::endl; + } +} + +void SmootherTakeCPU::finalizeMumpsSolver(DMUMPS_STRUC_C& mumps_solver) +{ + mumps_solver.job = JOB_END; + dmumps_c(&mumps_solver); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeCPU/matrixStencil.cpp b/src/Smoother/SmootherTakeCPU/matrixStencil.cpp new file mode 100644 index 00000000..8b1236d2 --- /dev/null +++ b/src/Smoother/SmootherTakeCPU/matrixStencil.cpp @@ -0,0 +1,117 @@ +#include "../../../include/Smoother/SmootherTakeCPU/smoother.h" + +const Stencil& SmootherTakeCPU::getStencil(int i_r) const +{ + assert(0 <= i_r && i_r < grid_.nr()); + + assert(grid_.numberSmootherCircles() >= 2); + assert(grid_.lengthSmootherRadial() >= 3); + + const int numberSmootherCircles = grid_.numberSmootherCircles(); + + if (i_r < numberSmootherCircles) { + /* Circle Section */ + if (i_r > 0 && i_r < numberSmootherCircles) { + return circle_stencil_interior_; + } + else if (i_r == 0) { + return DirBC_Interior_ ? stencil_DB_ : circle_stencil_across_origin_; + } + } + else { + /* Radial Section */ + if (i_r > numberSmootherCircles && i_r < grid_.nr() - 2) { + return radial_stencil_interior_; + } + else if (i_r == numberSmootherCircles) { + return radial_stencil_next_circular_smoothing_; + } + else if (i_r == grid_.nr() - 1) { + return stencil_DB_; + } + else if (i_r == grid_.nr() - 2) { + return radial_stencil_next_outer_DB_; + } + } + throw std::out_of_range("Invalid index for stencil"); +} + +int SmootherTakeCPU::getNonZeroCountCircleAsc(const int i_r) const +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + const int numberSmootherCircles = grid_.numberSmootherCircles(); + + const int size_stencil_inner_boundary = DirBC_Interior_ ? 1 : 4; + const int size_stencil_interior = 3; + + if (i_r > 0) { + return size_stencil_interior * grid_.ntheta(); + } + else if (i_r == 0) { + return size_stencil_inner_boundary * grid_.ntheta(); + } + throw std::out_of_range("Invalid index for nnz_circle_Asc"); +} + +int SmootherTakeCPU::getCircleAscIndex(const int i_r, const int i_theta) const +{ + assert(i_r >= 0 && i_r < grid_.numberSmootherCircles()); + + const int numberSmootherCircles = grid_.numberSmootherCircles(); + + const int size_stencil_inner_boundary = DirBC_Interior_ ? 1 : 4; + const int size_stencil_interior = 3; + + if (i_r > 0) { + return size_stencil_interior * i_theta; + } + else { + return size_stencil_inner_boundary * i_theta; + } +} + +int SmootherTakeCPU::getNonZeroCountRadialAsc(const int i_theta) const +{ + assert(i_theta >= 0 && i_theta < grid_.ntheta()); + + const int size_stencil_next_circluar_smoothing = 2; + const int size_stencil_interior = 3; + const int size_stencil_next_outer_boundary = 2; + const int size_stencil_outer_boundary = 1; + + assert(grid_.lengthSmootherRadial() >= 3); + + return size_stencil_next_circluar_smoothing + (grid_.lengthSmootherRadial() - 3) * size_stencil_interior + + size_stencil_next_outer_boundary + size_stencil_outer_boundary; +} + +int SmootherTakeCPU::getRadialAscIndex(const int i_r, const int i_theta) const +{ + assert(i_theta >= 0 && i_theta < grid_.ntheta()); + + const int size_stencil_next_circluar_smoothing = 2; + const int size_stencil_interior = 3; + const int size_stencil_next_outer_boundary = 2; + const int size_stencil_outer_boundary = 1; + + assert(grid_.lengthSmootherRadial() >= 3); + assert(grid_.numberSmootherCircles() >= 2); + + const int numberSmootherCircles = grid_.numberSmootherCircles(); + + if (i_r > numberSmootherCircles && i_r < grid_.nr() - 2) { + return size_stencil_next_circluar_smoothing + (i_r - numberSmootherCircles - 1) * size_stencil_interior; + } + else if (i_r == numberSmootherCircles) { + return 0; + } + else if (i_r == grid_.nr() - 2) { + return size_stencil_next_circluar_smoothing + (grid_.lengthSmootherRadial() - 3) * size_stencil_interior; + } + else if (i_r == grid_.nr() - 1) { + return size_stencil_next_circluar_smoothing + (grid_.lengthSmootherRadial() - 3) * size_stencil_interior + + size_stencil_next_outer_boundary; + } + throw std::out_of_range("Invalid index for stencil"); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeCPU/smoother.cpp b/src/Smoother/SmootherTakeCPU/smoother.cpp new file mode 100644 index 00000000..2102bde4 --- /dev/null +++ b/src/Smoother/SmootherTakeCPU/smoother.cpp @@ -0,0 +1,18 @@ +#include "../../../include/Smoother/SmootherTakeCPU/smoother.h" + +SmootherTakeCPU::SmootherTakeCPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, bool DirBC_Interior) + : grid_(level.grid()) + , level_cache_(level.levelCache()) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) +{ + buildAscMatrices(); + initializeMumpsSolver(inner_boundary_mumps_solver_, inner_boundary_circle_matrix_); +} + +SmootherTakeCPU::~SmootherTakeCPU() +{ + finalizeMumpsSolver(inner_boundary_mumps_solver_); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeGPU/0_constructor.cu b/src/Smoother/SmootherTakeGPU/0_constructor.cu new file mode 100644 index 00000000..fff00ea3 --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/0_constructor.cu @@ -0,0 +1,209 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +/* Constructor */ + +SmootherTakeGPU::SmootherTakeGPU(const Level& level, const DomainGeometry& domain_geometry, + const DensityProfileCoefficients& density_profile_coefficients, bool DirBC_Interior) + /* Constructor Members */ + : level_(level) + , domain_geometry_(domain_geometry) + , density_profile_coefficients_(density_profile_coefficients) + , DirBC_Interior_(DirBC_Interior) + /* Circle Tridiagonal Matrices */ + , circle_main_diagonals_(nullptr) + , circle_lower_diagonals_(nullptr) + , circle_upper_diagonals_(nullptr) + , sherman_morrison_gammas_(nullptr) + /* Radial Tridiagonal Matrices */ + , radial_main_diagonals_(nullptr) + , radial_lower_diagonals_(nullptr) + , radial_upper_diagonals_(nullptr) + /* Tridiagonal Solver Buffer */ + , pBuffer_(nullptr) + /* Inner Boundary CSR Matrix */ + , csrValA_(nullptr) + , csrRowPtrA_(nullptr) + , csrColIndA_(nullptr) + /* Inner Boundary Mumps COO Matrix */ + , inner_boundary_matrix_row_indices_(nullptr) + , inner_boundary_matrix_column_indices_(nullptr) + , inner_boundary_matrix_values_(nullptr) + , d_inner_boundary_matrix_row_indices_(nullptr) + , d_inner_boundary_matrix_column_indices_(nullptr) + , d_inner_boundary_matrix_values_(nullptr) +{ + const PolarGrid& grid = level.grid(); + + int nr = grid.nr(); + int ntheta = grid.ntheta(); + int number_smoother_circles = grid.numberSmootherCircles(); + int length_smoother_radial = grid.lengthSmootherRadial(); + + int circle_batch_count = number_smoother_circles; + int circle_m = ntheta; + /* Cyclic Tridiagonal Circle Matrices */ + cudaMalloc(&circle_lower_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_lower_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + cudaMalloc(&circle_main_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_main_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + cudaMalloc(&circle_upper_diagonals_, circle_m * circle_batch_count * sizeof(double)); + cudaMemset(circle_upper_diagonals_, 0, circle_m * circle_batch_count * sizeof(double)); + /* Cuda does not supply a cyclic tridiagonal solver. */ + /* Thus we use the Sherman–Morrison formula to reduce the problem to a simple tridiagonal problem with two right hand sides. */ + cudaMalloc(&sherman_morrison_gammas_, circle_batch_count * sizeof(double)); + cudaMemset(sherman_morrison_gammas_, 0, circle_batch_count * sizeof(double)); + cudaMalloc(&factor_, circle_batch_count * sizeof(double)); + cudaMemset(factor_, 0, circle_batch_count * sizeof(double)); + /* Remark: The 1st cylic tridiagonal matrix on the interior boundary is unused. */ + + int radial_batch_count = ntheta; + int radial_m = length_smoother_radial; + /* Tridiagonal Radial Matrices */ + cudaMalloc(&radial_lower_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_lower_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + cudaMalloc(&radial_main_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_main_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + cudaMalloc(&radial_upper_diagonals_, radial_m * radial_batch_count * sizeof(double)); + cudaMemset(radial_upper_diagonals_, 0, radial_m * radial_batch_count * sizeof(double)); + + /* Tridiaginal Cuda Solver */ + cusparseCreate(&sparse_handle_); + /* General Matrix Cuda Solver */ + cusolverSpCreate(&solver_handle_); + cusparseCreateMatDescr(&descrA_); + cusparseSetMatType(descrA_, CUSPARSE_MATRIX_TYPE_GENERAL); + cusparseSetMatIndexBase(descrA_, CUSPARSE_INDEX_BASE_ZERO); + + int interior_boundary_matrix_m = ntheta; + int interior_boundary_matrix_nnz = DirBC_Interior_ ? ntheta : 4 * ntheta; + /* Interior Boundary CSR Matrix */ + cudaMalloc(&csrValA_, interior_boundary_matrix_nnz * sizeof(double)); + cudaMemset(csrValA_, 0, interior_boundary_matrix_nnz * sizeof(double)); + cudaMalloc(&csrRowPtrA_, (interior_boundary_matrix_m + 1) * sizeof(int)); + cudaMemset(csrRowPtrA_, 0, (interior_boundary_matrix_m + 1) * sizeof(int)); + cudaMalloc(&csrColIndA_, interior_boundary_matrix_nnz * sizeof(int)); + cudaMemset(csrColIndA_, 0, interior_boundary_matrix_nnz * sizeof(int)); + + /* Allocate Tridiagonal Solver Buffer. */ + size_t bufferSizeInBytes_Circle; + cusparseDgtsv2StridedBatch_bufferSizeExt( + sparse_handle_, ntheta, nullptr, nullptr, nullptr, nullptr, + (number_smoother_circles+1) / 2, 2 * ntheta, &bufferSizeInBytes_Circle); + + size_t bufferSizeInBytes_Radial; + cusparseDgtsv2StridedBatch_bufferSizeExt( + sparse_handle_, length_smoother_radial, nullptr, nullptr, nullptr, nullptr, + ntheta / 2, 2 * length_smoother_radial, &bufferSizeInBytes_Radial); + + /* The Tridiagonal solvers require 5 * batch_count * m * sizeof(double) bytes. */ + /* Alternatively use four different pBuffers for each tridiagonal batch solver. */ + size_t max_pBufferSizeInBytes = std::max(bufferSizeInBytes_Circle, bufferSizeInBytes_Radial); + cudaMalloc(&pBuffer_, max_pBufferSizeInBytes); + + /* Inner Boundary Mumps COO Matrix */ + int nnz = DirBC_Interior_ ? grid.ntheta() : 4 * grid.ntheta(); + inner_boundary_matrix_row_indices_ = std::make_unique(nnz); + inner_boundary_matrix_column_indices_ = std::make_unique(nnz); + inner_boundary_matrix_values_ = std::make_unique(nnz); + + cudaMalloc(&d_inner_boundary_matrix_row_indices_, nnz * sizeof(int)); + cudaMemset(d_inner_boundary_matrix_row_indices_, 0, nnz* sizeof(int)); + cudaMalloc(&d_inner_boundary_matrix_column_indices_, nnz * sizeof(int)); + cudaMemset(d_inner_boundary_matrix_column_indices_, 0, nnz* sizeof(int)); + cudaMalloc(&d_inner_boundary_matrix_values_, nnz * sizeof(double)); + cudaMemset(d_inner_boundary_matrix_values_, 0, nnz* sizeof(double)); + + /* Build Smoother Matrices we have allocated. */ + buildAscMatrices(); + + initializeMumps(); + + /* The cyclic tridiagonal Matrices need to be adjusted to a system of a non-cyclic tridiagonal matrices. */ + adjustAscCircle_ShermanMorrison(); +} + + + +/* Destructor */ + +SmootherTakeGPU::~SmootherTakeGPU() { + /* Cyclic Tridiagonal Circle Matrices */ + if (circle_lower_diagonals_) { + cudaFree(circle_lower_diagonals_); + circle_lower_diagonals_ = nullptr; + } + if (circle_main_diagonals_) { + cudaFree(circle_main_diagonals_); + circle_main_diagonals_ = nullptr; + } + if (circle_upper_diagonals_) { + cudaFree(circle_upper_diagonals_); + circle_upper_diagonals_ = nullptr; + } + /* Cuda does not supply a cyclic tridiagonal solver. */ + /* Thus we use the Sherman–Morrison formula to reduce the problem to a simple tridiagonal problem with two right hand sides. */ + if (sherman_morrison_gammas_) { + cudaFree(sherman_morrison_gammas_); + sherman_morrison_gammas_ = nullptr; + } + if (factor_) { + cudaFree(factor_); + factor_ = nullptr; + } + + /* Tridiagonal Radial Matrices */ + if (radial_lower_diagonals_) { + cudaFree(radial_lower_diagonals_); + radial_lower_diagonals_ = nullptr; + } + if (radial_main_diagonals_) { + cudaFree(radial_main_diagonals_); + radial_main_diagonals_ = nullptr; + } + if (radial_upper_diagonals_) { + cudaFree(radial_upper_diagonals_); + radial_upper_diagonals_ = nullptr; + } + + /* Tridiaginal Cuda Solver */ + cusparseDestroy(sparse_handle_); + /* General Matrix Cuda Solver */ + cusolverSpDestroy(solver_handle_); + cusparseDestroyMatDescr(descrA_); + + /* Interior Boundary CSR Matrix */ + if (csrValA_) { + cudaFree(csrValA_); + csrValA_ = nullptr; + } + if (csrRowPtrA_) { + cudaFree(csrRowPtrA_); + csrRowPtrA_ = nullptr; + } + if (csrColIndA_) { + cudaFree(csrColIndA_); + csrColIndA_ = nullptr; + } + + /* Free Tridiagonal Solver Buffer. */ + if (pBuffer_) { + cudaFree(pBuffer_); + pBuffer_ = nullptr; + } + + /* Inner Boundary Mumps COO Matrix */ + if (d_inner_boundary_matrix_row_indices_) { + cudaFree(d_inner_boundary_matrix_row_indices_); + d_inner_boundary_matrix_row_indices_ = nullptr; + } + if (d_inner_boundary_matrix_column_indices_) { + cudaFree(d_inner_boundary_matrix_column_indices_); + d_inner_boundary_matrix_column_indices_ = nullptr; + } + if (d_inner_boundary_matrix_values_) { + cudaFree(d_inner_boundary_matrix_values_); + d_inner_boundary_matrix_values_ = nullptr; + } + + finalizeMumpsSolver(); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeGPU/1.1_initializeMumps.cu b/src/Smoother/SmootherTakeGPU/1.1_initializeMumps.cu new file mode 100644 index 00000000..ba37ef57 --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/1.1_initializeMumps.cu @@ -0,0 +1,90 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +void SmootherTakeGPU::initializeMumps(){ + inner_boundary_mumps_solver_.job = JOB_INIT; + inner_boundary_mumps_solver_.par = PAR_PARALLEL; + /* The matrix is positive definite for invertible mappings. */ + /* Therefore we use SYM_POSITIVE_DEFINITE instead of SYM_GENERAL_SYMMETRIC. */ + inner_boundary_mumps_solver_.sym = SYM_UNSYMMETRIC; + inner_boundary_mumps_solver_.comm_fortran = USE_COMM_WORLD; + dmumps_c(&inner_boundary_mumps_solver_); + + inner_boundary_mumps_solver_.ICNTL(1) = 0; // Output stream for error messages. + inner_boundary_mumps_solver_.ICNTL(2) = 0; // Output stream for diagnostic printing and statistics local to each MPI process. + inner_boundary_mumps_solver_.ICNTL(3) = 0; // Output stream for global information, collected on the host + inner_boundary_mumps_solver_.ICNTL(4) = 0; // Level of printing for error, warning, and diagnostic messages. + inner_boundary_mumps_solver_.ICNTL(5) = 0; // Controls the matrix input format + inner_boundary_mumps_solver_.ICNTL(6) = 7; // Permutes the matrix to a zero-free diagonal and/or scale the matrix + inner_boundary_mumps_solver_.ICNTL(7) = + 5; // Computes a symmetric permutation (ordering) to determine the pivot order to be used for the + // factorization in case of sequential analysis + inner_boundary_mumps_solver_.ICNTL(8) = 77; // Describes the scaling strategy + inner_boundary_mumps_solver_.ICNTL(9) = 1; // Computes the solution using A or A^T + inner_boundary_mumps_solver_.ICNTL(10) = 0; // Applies the iterative refinement to the computed solution + inner_boundary_mumps_solver_.ICNTL(11) = 0; // Computes statistics related to an error analysis of the linear system solved + inner_boundary_mumps_solver_.ICNTL(12) = 0; // Defines an ordering strategy for symmetric matrices and is used + inner_boundary_mumps_solver_.ICNTL(13) = 0; // Controls the parallelism of the root node + inner_boundary_mumps_solver_.ICNTL(14) = 20;// Controls the percentage increase in the estimated working space + inner_boundary_mumps_solver_.ICNTL(15) = 0; // Exploits compression of the input matrix resulting from a block format + inner_boundary_mumps_solver_.ICNTL(16) = 0; // Controls the setting of the number of OpenMP threads + // ICNTL(17) Doesn't exist + inner_boundary_mumps_solver_.ICNTL(18) = 0; // Defines the strategy for the distributed input matrix + inner_boundary_mumps_solver_.ICNTL(19) = 0; // Computes the Schur complement matrix + inner_boundary_mumps_solver_.ICNTL(20) = 0; // Determines the format (dense, sparse, or distributed) of the right-hand sides + inner_boundary_mumps_solver_.ICNTL(21) = 0; // Determines the distribution (centralized or distributed) of the solution vectors. + inner_boundary_mumps_solver_.ICNTL(22) = 0; // Controls the in-core/out-of-core (OOC) factorization and solve. + inner_boundary_mumps_solver_.ICNTL(23) = 0; // Corresponds to the maximum size of the working memory in MegaBytes that MUMPS can + // allocate per working process + inner_boundary_mumps_solver_.ICNTL(24) = 0; // Controls the detection of “null pivot rows”. + inner_boundary_mumps_solver_.ICNTL(25) = + 0; // Allows the computation of a solution of a deficient matrix and also of a null space basis + inner_boundary_mumps_solver_.ICNTL(26) = 0; // Drives the solution phase if a Schur complement matrix has been computed + inner_boundary_mumps_solver_.ICNTL(27) = -32; // Controls the blocking size for multiple right-hand sides. + inner_boundary_mumps_solver_.ICNTL(28) = 0; // Determines whether a sequential or parallel computation of the ordering is performed + inner_boundary_mumps_solver_.ICNTL(29) = + 0; // Defines the parallel ordering tool (when ICNTL(28)=1) to be used to compute the fill-in reducing permutation. + inner_boundary_mumps_solver_.ICNTL(30) = 0; // Computes a user-specified set of entries in the inverse A^−1 of the original matrix + inner_boundary_mumps_solver_.ICNTL(31) = 0; // Indicates which factors may be discarded during the factorization. + inner_boundary_mumps_solver_.ICNTL(32) = 0; // Performs the forward elimination of the right-hand sides during the factorization + inner_boundary_mumps_solver_.ICNTL(33) = 0; // Computes the determinant of the input matrix. + inner_boundary_mumps_solver_.ICNTL(34) = 0; // Controls the conservation of the OOC files during JOB= –3 + inner_boundary_mumps_solver_.ICNTL(35) = 0; // Controls the activation of the BLR feature + inner_boundary_mumps_solver_.ICNTL(36) = 0; // Controls the choice of BLR factorization variant + inner_boundary_mumps_solver_.ICNTL(37) = 0; // Controls the BLR compression of the contribution blocks + inner_boundary_mumps_solver_.ICNTL(38) = 600; // Estimates compression rate of LU factors + inner_boundary_mumps_solver_.ICNTL(39) = 500; // Estimates compression rate of contribution blocks + // ICNTL(40-47) Don't exist + inner_boundary_mumps_solver_.ICNTL(48) = 1; // Multithreading with tree parallelism + inner_boundary_mumps_solver_.ICNTL(49) = 0; // Compact workarray id%S at the end of factorization phase + // ICNTL(50-55) Don't exist + inner_boundary_mumps_solver_.ICNTL(56) = + 0; // Detects pseudo-singularities during factorization and factorizes the root node with a rankrevealing method + // ICNTL(57) Doesn't exist + inner_boundary_mumps_solver_.ICNTL(58) = 2; // Defines options for symbolic factorization + // ICNTL(59-60) Don't exist + + inner_boundary_mumps_solver_.CNTL(1) = -1.0; // Relative threshold for numerical pivoting + inner_boundary_mumps_solver_.CNTL(2) = -1.0; // Stopping criterion for iterative refinement + inner_boundary_mumps_solver_.CNTL(3) = 0.0; // Determine null pivot rows + inner_boundary_mumps_solver_.CNTL(4) = -1.0; // Determines the threshold for static pivoting + inner_boundary_mumps_solver_.CNTL(5) = + 0.0; // Defines the fixation for null pivots and is effective only when null pivot row detection is active + // CNTL(6) Doesn't exist + inner_boundary_mumps_solver_.CNTL(7) = 0.0; // Defines the precision of the dropping parameter used during BLR compression + // CNTL(8-15) Don't exist + + inner_boundary_mumps_solver_.job = JOB_ANALYSIS_AND_FACTORIZATION; + inner_boundary_mumps_solver_.n = level_.grid().ntheta(); + inner_boundary_mumps_solver_.nz = DirBC_Interior_ ? level_.grid().ntheta() : 4 * level_.grid().ntheta(); + inner_boundary_mumps_solver_.irn = inner_boundary_matrix_row_indices_.get(); + inner_boundary_mumps_solver_.jcn = inner_boundary_matrix_column_indices_.get(); + inner_boundary_mumps_solver_.a = inner_boundary_matrix_values_.get(); + + dmumps_c(&inner_boundary_mumps_solver_); +} + +void SmootherTakeGPU::finalizeMumpsSolver() +{ + inner_boundary_mumps_solver_.job = JOB_END; + dmumps_c(&inner_boundary_mumps_solver_); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeGPU/1_buildAscMatrices.cu b/src/Smoother/SmootherTakeGPU/1_buildAscMatrices.cu new file mode 100644 index 00000000..0e7178aa --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/1_buildAscMatrices.cu @@ -0,0 +1,430 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +__global__ void build_AscMatrices_kernel( + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* radial_lower_diagonals, double* radial_main_diagonals, double* radial_upper_diagonals, + double* csrValA, int* csrRowPtrA, int* csrColIndA, + int* d_inner_boundary_matrix_row_indices, + int* d_inner_boundary_matrix_column_indices, + double* d_inner_boundary_matrix_values, + PolarGrid* grid, bool DirBC_Interior, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = DirBC_Interior ? 0 : -1; + const int max_i_r = grid->nr() - 1; + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + + /* Local (shared memory) thread indices. */ + const int s_i_r = threadIdx.x; + const int s_i_theta = threadIdx.y; + + /* Compute Jacobian on current node */ + const double r = grid->radius(i_r); + const double theta = grid->theta(i_theta); + + const double sin_theta = sin_theta_cache[i_theta]; + const double cos_theta = cos_theta_cache[i_theta]; + + const double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + const double coeff_alpha = coeff_alpha_cache[i_r]; + + const double detDF = Jrr * Jtt - Jrt * Jtr; + const double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + const double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + + __syncthreads(); + + /* Node lies outside of the grid. */ + if (global_i_r < 0 || global_i_r >= grid->nr() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if (s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Compute neighbor distances */ + bool isOnInnerBoundary = (i_r == 0); + bool isOnOuterBoundary = (i_r == grid->nr() - 1); + + double h1 = DirBC_Interior ? + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 0.0) : + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 2.0 * grid->radius(0)); + double h2 = (!isOnOuterBoundary) ? grid->radialSpacing(i_r) : 0.0; + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + double coeff1 = (h1 != 0.0) ? 0.5 * (k1 + k2) / h1 : 0.0; + double coeff2 = (h2 != 0.0) ? 0.5 * (k1 + k2) / h2 : 0.0; + double coeff3 = (k1 != 0.0) ? 0.5 * (h1 + h2) / k1 : 0.0; + double coeff4 = (k2 != 0.0) ? 0.5 * (h1 + h2) / k2 : 0.0; + + int i_theta_M1 = grid->wrapThetaIndex(i_theta - 1); + int i_theta_P1 = grid->wrapThetaIndex(i_theta + 1); + + const int numberSmootherCircles = grid->numberSmootherCircles(); + const int lengthSmootherRadial = grid->lengthSmootherRadial(); + + int row, column; + double value; + + int circle_m = grid->ntheta(); + int radial_m = grid->lengthSmootherRadial(); + + /* ------------------------------------------ */ + /* Circle Section: Node in the inner boundary */ + /* ------------------------------------------ */ + if(i_r == 0){ + if(DirBC_Interior){ + /* ------------------------------------------------ */ + /* Case 1: Dirichlet boundary on the inner boundary */ + /* ------------------------------------------------ */ + int n = grid->ntheta(); + int nnz = grid->ntheta(); + if (i_theta < n) { + csrRowPtrA[i_theta] = i_theta; + csrColIndA[i_theta] = i_theta; + csrValA[i_theta] = 1.0; + } + if (i_theta == 0) { + csrRowPtrA[n] = n; + } + + d_inner_boundary_matrix_row_indices[i_theta] = i_theta + 1; + d_inner_boundary_matrix_column_indices[i_theta] = i_theta + 1; + d_inner_boundary_matrix_values[i_theta] = 1.0; + } + else{ + /* ------------------------------------------------------------- */ + /* Case 2: Across origin discretization on the interior boundary */ + /* ------------------------------------------------------------- */ + /* h1 gets replaced with 2 * R0. */ + /* (i_r-1,i_theta) gets replaced with (i_r, i_theta + (grid.ntheta()>>1)). */ + /* Some more adjustments from the changing the 9-point stencil to the artifical 7-point stencil. */ + + int i_theta_AcrossOrigin = grid->wrapThetaIndex(i_theta + grid->ntheta() / 2); + + const int center_index = i_theta; + const int left_index = i_theta_AcrossOrigin; + const int bottom_index = i_theta_M1; + const int top_index = i_theta_P1; + + const int center_nz_index = 4 * i_theta; + + /* There are 4 non zero entries per row. */ + csrRowPtrA[i_theta] = 4 * i_theta; + if(i_theta == 0) csrRowPtrA[grid->ntheta()] = 4 * grid->ntheta(); + + /* Stencil Indexing */ + int StencilType_Center = 0; + int StencilType_Left = 1; + int StencilType_Bottom = 2; + int StencilType_Top = 3; + + double center_value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + csrColIndA[center_nz_index + StencilType_Center] = center_index; + csrValA[center_nz_index + StencilType_Center] = center_value; + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Center] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Center] = center_index+ 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Center] = center_value; + + double left_value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + csrColIndA[center_nz_index + StencilType_Left] = left_index; + csrValA[center_nz_index + StencilType_Left] = left_value; + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Left] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Left] = left_index + 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Left] = left_value; + + double bottom_value = -coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]); + csrColIndA[center_nz_index + StencilType_Bottom] = bottom_index; + csrValA[center_nz_index + StencilType_Bottom] = bottom_value; + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Bottom] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Bottom] = bottom_index + 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Bottom] = bottom_value; + + double top_value = -coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]); + csrColIndA[center_nz_index + StencilType_Top] = top_index; + csrValA[center_nz_index + StencilType_Top] = top_value; + d_inner_boundary_matrix_row_indices[center_nz_index + StencilType_Top] = center_index + 1; + d_inner_boundary_matrix_column_indices[center_nz_index + StencilType_Top] = top_index + 1; + d_inner_boundary_matrix_values[center_nz_index + StencilType_Top] = top_value; + } + } + /* ------------------------------------------ */ + /* Node in the interior of the Circle Section */ + /* ------------------------------------------ */ + else if(i_r > 0 && i_r < numberSmootherCircles){ + + int center_index = i_theta; + int bottom_index = i_theta_M1; + int top_index = i_theta_P1; + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + + /* Bottom */ + row = center_index; + column = bottom_index; + value = - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + + /* Top */ + row = center_index; + column = top_index; + value = - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]); + if (row == column) circle_main_diagonals[i_r * circle_m + row] = value; + else if (row == column + 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == column - 1) circle_upper_diagonals[i_r * circle_m + row] = value; + else if (row == 0 && column == circle_m - 1) circle_lower_diagonals[i_r * circle_m + row] = value; + else if (row == circle_m - 1 && column == 0) circle_upper_diagonals[i_r * circle_m + row] = value; + } + /* --------------------------------------------- */ + /* Radial Section: Node next to circular section */ + /* --------------------------------------------- */ + else if(i_r == numberSmootherCircles){ + + int center_index = i_r - numberSmootherCircles; + int right_index = i_r - numberSmootherCircles + 1; + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r + 1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + /* ------------------------------------------ */ + /* Node in the interior of the Radial Section */ + /* ------------------------------------------ */ + else if(i_r > numberSmootherCircles && i_r < grid->nr()-2){ + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + int right_index = i_r - numberSmootherCircles + 1; + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Left */ + row = center_index; + column = left_index; + value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + /* ------------------------------------------- */ + /* Radial Section: Node next to outer boundary */ + /* ------------------------------------------- */ + else if(i_r == grid->nr()-2){ + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + int right_index = i_r - numberSmootherCircles + 1; + + /* Center: (Left, Right, Bottom, Top) */ + row = center_index; + column = center_index; + value = ( + + 0.25 * (h1 + h2) * (k1 + k2) * coeff_beta_cache[i_r] * fabs(detDF) + + coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) + + coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) + + coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) + + coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) + ); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Left */ + row = center_index; + column = left_index; + value = -coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]); + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + /* Right */ + row = center_index; + column = right_index; + value = 0.0; + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } + /* ------------------------------------------ */ + /* Radial Section: Node on the outer boundary */ + /* ------------------------------------------ */ + else if(i_r == grid->nr()-1){ + + int center_index = i_r - numberSmootherCircles; + int left_index = i_r - numberSmootherCircles - 1; + + row = center_index; + column = center_index; + value = 1.0; + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + + row = center_index; + column = left_index; + value = 0.0; + if (row == column) radial_main_diagonals[i_theta * radial_m + row] = value; + else if (row == column + 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == column - 1) radial_upper_diagonals[i_theta * radial_m + row] = value; + else if (row == 0 && column == radial_m - 1) radial_lower_diagonals[i_theta * radial_m + row] = value; + else if (row == radial_m - 1 && column == 0) radial_upper_diagonals[i_theta * radial_m + row] = value; + } +} + + + +void SmootherTakeGPU::buildAscMatrices() +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, &domain_geometry_, sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + /* We use precomputed DensityProfileCoefficients values. */ + // DensityProfileCoefficients* device_density_profile; + // cudaMalloc(&device_density_profile, sizeof(DensityProfileCoefficients)); + // cudaMemcpy(device_density_profile, &density_profile_coefficients_, sizeof(DensityProfileCoefficients), cudaMemcpyHostToDevice); + + /* The stencil is computed on a 14x14 grid. */ + /* We use a 16x16 halo block to compute the expensive values. */ + /* This minimizes threads beeing idle. */ + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.nr() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + build_AscMatrices_kernel<<>>( + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + radial_lower_diagonals_, radial_main_diagonals_, radial_upper_diagonals_, + csrValA_, csrRowPtrA_, csrColIndA_, + d_inner_boundary_matrix_row_indices_, + d_inner_boundary_matrix_column_indices_, + d_inner_boundary_matrix_values_, + level_.device_grid(), DirBC_Interior_, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); + + int nnz = DirBC_Interior_ ? grid.ntheta() : 4 * grid.ntheta(); + cudaMemcpy(inner_boundary_matrix_row_indices_.get(), d_inner_boundary_matrix_row_indices_, nnz * sizeof(int), cudaMemcpyDeviceToHost); + cudaMemcpy(inner_boundary_matrix_column_indices_.get(), d_inner_boundary_matrix_column_indices_, nnz * sizeof(int), cudaMemcpyDeviceToHost); + cudaMemcpy(inner_boundary_matrix_values_.get(), d_inner_boundary_matrix_values_, nnz * sizeof(double), cudaMemcpyDeviceToHost); + + /* We use precomputed DensityProfileCoefficients values. */ + cudaFree(device_domain_geometry); + // cudaFree(device_density_profile); +} diff --git a/src/Smoother/SmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu b/src/Smoother/SmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu new file mode 100644 index 00000000..ac6c73a3 --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/2_adjustAscCircle_ShermanMorrison.cu @@ -0,0 +1,44 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +__global__ void adjustAscCircle_ShermanMorrison_kernel( + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, + PolarGrid* grid) +{ + int i_r = blockIdx.x * blockDim.x + threadIdx.x; + if(i_r < 0 || i_r >= grid->numberSmootherCircles()) return; + + int circle_m = grid->ntheta(); + + if(i_r == 0){ + sherman_morrison_gammas[i_r] = 0.0; // Unused + } + else if(i_r > 0 && i_r < grid->numberSmootherCircles()) + { + /* gamma_ = -main_diagonal(0); */ + double gamma = -circle_main_diagonals[i_r * circle_m + 0]; + /* main_diagonal(0) -= gamma_; */ + circle_main_diagonals[i_r * circle_m + 0] -= gamma; + /* main_diagonal(matrix_dimension_ - 1) -= cyclic_corner_element() * cyclic_corner_element() / gamma_; */ + double alpha = circle_lower_diagonals[i_r * circle_m + 0]; + double beta = circle_upper_diagonals[i_r * circle_m + circle_m-1]; + circle_main_diagonals[i_r * circle_m + circle_m-1] -= alpha * beta / gamma; + /* We will need gamma later again. */ + sherman_morrison_gammas[i_r] = gamma; + } +} + +void SmootherTakeGPU::adjustAscCircle_ShermanMorrison() +{ + const PolarGrid& grid = level_.grid(); + + int blockSize = 256; + int numBlocks = (grid.numberSmootherCircles() + blockSize - 1) / blockSize; + + adjustAscCircle_ShermanMorrison_kernel<<>>( + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid() + ); + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeGPU/3_smoothingInPlace.cu b/src/Smoother/SmootherTakeGPU/3_smoothingInPlace.cu new file mode 100644 index 00000000..120f456e --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/3_smoothingInPlace.cu @@ -0,0 +1,35 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +void SmootherTakeGPU::smoothingInPlace(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + assert(x.size() == grid.numberOfNodes()); + assert(rhs.size() == grid.numberOfNodes()); + assert(temp.size() == grid.numberOfNodes()); + + DomainGeometry* device_domain_geometry; + cudaMalloc(&device_domain_geometry, sizeof(DomainGeometry)); + cudaMemcpy(device_domain_geometry, &domain_geometry_, sizeof(DomainGeometry), cudaMemcpyHostToDevice); + + /* We use precomputed DensityProfileCoefficients values. */ + // DensityProfileCoefficients* device_density_profile; + // cudaMalloc(&device_density_profile, sizeof(DensityProfileCoefficients)); + // cudaMemcpy(device_density_profile, &density_profile_coefficients_, sizeof(DensityProfileCoefficients), cudaMemcpyHostToDevice); + + applyAscOrtho_BlackCircle(x, rhs, temp, device_domain_geometry); + solveAsc_BlackCircle(x, rhs, temp); + + applyAscOrtho_WhiteCircle(x, rhs, temp, device_domain_geometry); + solveAsc_WhiteCircle(x, rhs, temp); + + applyAscOrtho_BlackRadial(x, rhs, device_domain_geometry); + solveAsc_BlackRadial(x, rhs); + + applyAscOrtho_WhiteRadial(x, rhs, device_domain_geometry); + solveAsc_WhiteRadial(x, rhs); + + /* We use precomputed DensityProfileCoefficients values. */ + cudaFree(device_domain_geometry); + // cudaFree(device_density_profile); +} diff --git a/src/Smoother/SmootherTakeGPU/4_applyAscOrtho_Circle.cu b/src/Smoother/SmootherTakeGPU/4_applyAscOrtho_Circle.cu new file mode 100644 index 00000000..29a8c6ab --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/4_applyAscOrtho_Circle.cu @@ -0,0 +1,197 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +__global__ void applyAscOrtho_Circle_kernel( + double* x, double* rhs, double* temp, + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, + PolarGrid* grid, bool DirBC_Interior, + int start_i_r, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = DirBC_Interior ? 0 : -1; + const int max_i_r = grid->numberSmootherCircles(); + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_x[16][16 + 1]; + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_art[16][16 + 1]; + + /* Local (shared memory) thread indices. */ + const int s_i_r = threadIdx.x; + const int s_i_theta = threadIdx.y; + + /* Load x value into shared memory. */ + const int center_index = grid->index(i_r, i_theta); + s_x[s_i_r][s_i_theta] = x[center_index]; + + /* Compute Jacobian on current node */ + const double r = grid->radius(i_r); + const double theta = grid->theta(i_theta); + + const double sin_theta = sin_theta_cache[i_theta]; + const double cos_theta = cos_theta_cache[i_theta]; + + const double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + const double coeff_alpha = coeff_alpha_cache[i_r]; + + const double detDF = Jrr * Jtt - Jrt * Jtr; + const double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + const double art = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_art[s_i_r][s_i_theta] = art; + + __syncthreads(); + + /* Node lies outside of the circle section. */ + if(global_i_r < 0 || global_i_r >= grid->numberSmootherCircles() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if (s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Node color and smoother color doesnt match. */ + if(i_r % 2 != start_i_r) return; + + + /* Prepare temp for the 2nd solution in the Shermann-Morrison formula. */ + if(i_r > 0){ + int matrix_index = i_r * grid->ntheta(); + if(i_theta == 0){ + temp[matrix_index + i_theta] = sherman_morrison_gammas[i_r]; + } + else if(i_theta > 0 && i_theta < grid->ntheta()-1){ + temp[matrix_index + i_theta] = 0.0; + } + else if(i_theta == grid->ntheta()-1){ + temp[matrix_index + i_theta] = circle_upper_diagonals[matrix_index + grid->ntheta() - 1]; + } + } + + /* Compute neighbor distances */ + bool isOnInnerBoundary = (i_r == 0); + + double h1 = DirBC_Interior ? + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 0.0) : + ((!isOnInnerBoundary) ? grid->radialSpacing(i_r - 1) : 2.0 * grid->radius(0)); + double h2 = grid->radialSpacing(i_r); + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + if (!isOnInnerBoundary) { + + double coeff1 = 0.5 * (k1 + k2) / h1; + double coeff2 = 0.5 * (k1 + k2) / h2; + + x[center_index] = rhs[center_index] - ( + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else if(isOnInnerBoundary && !DirBC_Interior){ + + double coeff2 = 0.5 * (k1 + k2) / h2; + + x[center_index] = rhs[center_index] - ( + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * s_x[s_i_r+1][s_i_theta] /* Right */ + + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + else if(isOnInnerBoundary && DirBC_Interior){ + x[center_index] = rhs[center_index]; + } +} + + + +void SmootherTakeGPU::applyAscOrtho_BlackCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry) +{ + + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.numberSmootherCircles() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + applyAscOrtho_Circle_kernel<<>>( + x.data(), rhs.data(), temp.data(), + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid(), DirBC_Interior_, + start_black_circles, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} + + + +void SmootherTakeGPU::applyAscOrtho_WhiteCircle( + GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.numberSmootherCircles() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + applyAscOrtho_Circle_kernel<<>>( + x.data(), rhs.data(), temp.data(), + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + level_.device_grid(), DirBC_Interior_, + start_white_circles, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} diff --git a/src/Smoother/SmootherTakeGPU/5_applyAscOrtho_Radial.cu b/src/Smoother/SmootherTakeGPU/5_applyAscOrtho_Radial.cu new file mode 100644 index 00000000..a3525d72 --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/5_applyAscOrtho_Radial.cu @@ -0,0 +1,177 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +__global__ void applyAscOrtho_Radial_kernel( + double* x, double* rhs, + PolarGrid* grid, bool DirBC_Interior, + int start_i_theta, + DomainGeometry* domain_geometry, + double* coeff_alpha_cache, double* coeff_beta_cache, + double* sin_theta_cache, double* cos_theta_cache) +{ + /* The thread block covers a 14x14 region within a 16x16 shared memory block (1-cell halo). */ + const int global_i_r = grid->numberSmootherCircles() + blockIdx.x * 14 + threadIdx.x - 1; + const int global_i_theta = blockIdx.y * 14 + threadIdx.y - 1; + + /* Adjust for across origin and periodic boundary. */ + int i_r = global_i_r; + int i_theta = global_i_theta; + if(i_r == -1 && !DirBC_Interior){ + i_r = 0; + i_theta += grid->ntheta() / 2; + } + i_theta = grid->wrapThetaIndex(i_theta); + + /* Define bounds for valid global indices (domain + halo). */ + const int min_i_r = grid->numberSmootherCircles() - 1; + const int max_i_r = grid->nr() - 1; + const int min_i_theta = -1; + const int max_i_theta = grid->ntheta(); + + /* Exit if outside of the computational domain and halo region. */ + if (global_i_r < min_i_r || global_i_r > max_i_r || global_i_theta < min_i_theta || global_i_theta > max_i_theta) return; + + /* Allocate shared memory with padding for avoiding bank conflicts. */ + __shared__ double s_x[16][16 + 1]; + __shared__ double s_arr[16][16 + 1]; + __shared__ double s_att[16][16 + 1]; + __shared__ double s_art[16][16 + 1]; + + /* Local (shared memory) thread indices. */ + const int s_i_r = threadIdx.x; + const int s_i_theta = threadIdx.y; + + /* Load x value into shared memory. */ + const int center_index = grid->index(i_r, i_theta); + s_x[s_i_r][s_i_theta] = x[center_index]; + + /* Compute Jacobian on current node */ + const double r = grid->radius(i_r); + const double theta = grid->theta(i_theta); + + const double sin_theta = sin_theta_cache[i_theta]; + const double cos_theta = cos_theta_cache[i_theta]; + + const double Jrr = domain_geometry->dFx_dr(r, theta, sin_theta, cos_theta); + const double Jtr = domain_geometry->dFy_dr(r, theta, sin_theta, cos_theta); + const double Jrt = domain_geometry->dFx_dt(r, theta, sin_theta, cos_theta); + const double Jtt = domain_geometry->dFy_dt(r, theta, sin_theta, cos_theta); + + const double coeff_alpha = coeff_alpha_cache[i_r]; + + const double detDF = Jrr * Jtt - Jrt * Jtr; + const double arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_alpha / fabs(detDF); + const double att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_alpha / fabs(detDF); + const double art = (- Jtt * Jtr - Jrt * Jrr) * coeff_alpha / fabs(detDF); + + /* Share data to nodes in local grid block. */ + s_arr[s_i_r][s_i_theta] = arr; + s_att[s_i_r][s_i_theta] = att; + s_art[s_i_r][s_i_theta] = art; + + __syncthreads(); + + /* Node lies outside of the radial section. */ + if (global_i_r < grid->numberSmootherCircles() || global_i_r >= grid->nr() || global_i_theta < 0 || global_i_theta >= grid->ntheta()) return; + /* Node lies on the halo. */ + if(s_i_r == 0 || s_i_r == 15 || s_i_theta == 0 || s_i_theta == 15) return; + + /* Node color and smoother color doesnt match. */ + if(i_theta % 2 != start_i_theta) return; + + bool isOnOuterBoundary = (i_r == grid->nr()-1); + bool isNextToCircleSection = (i_r == grid->numberSmootherCircles()); + + double h1 = grid->radialSpacing(i_r-1); + double h2 = ((!isOnOuterBoundary) ? grid->radialSpacing(i_r) : 0.0); + double k1 = grid->angularSpacing(i_theta - 1); + double k2 = grid->angularSpacing(i_theta); + + if(i_r >= grid->numberSmootherCircles() && i_r < grid->nr() - 1){ + double coeff3 = 0.5 * (h1 + h2) / k1; + double coeff4 = 0.5 * (h1 + h2) / k2; + x[center_index] = rhs[center_index] - ( + - coeff3 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta-1]) * s_x[s_i_r][s_i_theta-1] /* Bottom */ + - coeff4 * (s_att[s_i_r][s_i_theta] + s_att[s_i_r][s_i_theta+1]) * s_x[s_i_r][s_i_theta+1] /* Top */ + - 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r-1][s_i_theta-1] /* Bottom Left */ + + 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta-1]) * s_x[s_i_r+1][s_i_theta-1] /* Bottom Right */ + + 0.25 * (s_art[s_i_r-1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r-1][s_i_theta+1] /* Top Left */ + - 0.25 * (s_art[s_i_r+1][s_i_theta] + s_art[s_i_r][s_i_theta+1]) * s_x[s_i_r+1][s_i_theta+1] /* Top Right */ + ); + } + if (i_r == grid->numberSmootherCircles()){ + double coeff1 = 0.5 * (k1 + k2) / h1; + x[center_index] -= ( + - coeff1 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r-1][s_i_theta]) * s_x[s_i_r-1][s_i_theta] /* Left */ + ); + } + if (i_r == grid->nr() - 2){ + double coeff2 = 0.5 * (k1 + k2) / h2; + x[center_index] -= ( + /* "Right" is part of the radial Asc smoother matrices, */ + /* but is shifted over to the rhs to make the radial Asc smoother matrices symmetric. */ + /* Note that the circle Asc smoother matrices are symmetric by default. */ + - coeff2 * (s_arr[s_i_r][s_i_theta] + s_arr[s_i_r+1][s_i_theta]) * rhs[grid->index(i_r + 1, i_theta)] /* Right */ + ); + } + if (i_r == grid->nr() - 1){ + x[center_index] = rhs[center_index]; + } +} + + + +void SmootherTakeGPU::applyAscOrtho_BlackRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_black_radials = 0; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.lengthSmootherRadial() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + applyAscOrtho_Radial_kernel<<>>( + x.data(), rhs.data(), + level_.device_grid(), DirBC_Interior_, + start_black_radials, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} + + + +void SmootherTakeGPU::applyAscOrtho_WhiteRadial( + GPU_Vector& x, const GPU_Vector& rhs, + DomainGeometry* device_domain_geometry) +{ + const PolarGrid& grid = level_.grid(); + + const GPU_Vector& sin_theta_cache = level_.levelCache().GPU_sin_theta(); + const GPU_Vector& cos_theta_cache = level_.levelCache().GPU_cos_theta(); + + const GPU_Vector& coeff_alpha_cache = level_.levelCache().GPU_coeff_alpha(); + const GPU_Vector& coeff_beta_cache = level_.levelCache().GPU_coeff_beta(); + + const int start_white_radials = 1; + + dim3 threadsPerBlock(16, 16); + dim3 numBlocks((grid.lengthSmootherRadial() + 14 - 1) / 14, (grid.ntheta() + 14 - 1) / 14); + applyAscOrtho_Radial_kernel<<>>( + x.data(), rhs.data(), + level_.device_grid(), DirBC_Interior_, + start_white_radials, + device_domain_geometry, + coeff_alpha_cache.data(), coeff_beta_cache.data(), + sin_theta_cache.data(), cos_theta_cache.data() + ); + cudaDeviceSynchronize(); +} diff --git a/src/Smoother/SmootherTakeGPU/6_solveAsc_Circle.cu b/src/Smoother/SmootherTakeGPU/6_solveAsc_Circle.cu new file mode 100644 index 00000000..8fd8412e --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/6_solveAsc_Circle.cu @@ -0,0 +1,227 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + +#include + +__global__ void computeCicleFactor_kernel( + double* x, double* temp, double* factor, + double* circle_lower_diagonals, double* circle_main_diagonals, double* circle_upper_diagonals, + double* sherman_morrison_gammas, + int start_circle_solver, PolarGrid* grid) +{ + int i_r = start_circle_solver + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + if(i_r < grid->numberSmootherCircles()){ + int matrix_index = i_r * grid->ntheta(); + double alpha = circle_lower_diagonals[matrix_index + 0]; + double gamma = sherman_morrison_gammas[i_r]; + factor[i_r] = (x[matrix_index + 0] + x[matrix_index + grid->ntheta()-1] * alpha / gamma) / + (1.0 + temp[matrix_index + 0] + temp[matrix_index + grid->ntheta()-1] * alpha / gamma); + } +} + + +__global__ void combineCicleSolutions_kernel( + double* x, double* temp, double* factor, + int start_circle_solver, PolarGrid* grid) +{ + int i_r = start_circle_solver + 2 * (blockIdx.x * blockDim.x + threadIdx.x); + int i_theta = blockIdx.y * blockDim.y + threadIdx.y; + + if (i_r < grid->numberSmootherCircles() && i_theta < grid->ntheta()) { + int matrix_index = i_r * grid->ntheta(); + x[matrix_index + i_theta] -= factor[i_r] * temp[matrix_index + i_theta]; + } +} + + + +void SmootherTakeGPU::solveAsc_BlackCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0; + + /* Can run in parallel if needed. */ + if(start_black_circles == 0){ + /* This approach is very slow. */ + /* I wasnt able to find working analysis + solve methods in cuSparse/cuSolver. */ + /* Thus we use Mumps instead. */ + + // // Source: x, Destination: temp + // cudaMemcpy(temp.data(), x.data(), grid.ntheta() * sizeof(double), cudaMemcpyDeviceToDevice); + + // int singularity = 0; + // double tol = 1e-10; + // int reorder = 0; + + // int n = grid.ntheta(); + // int nnzA = DirBC_Interior_ ? grid.ntheta() : 4 * grid.ntheta(); + + // cusolverSpDcsrlsvchol( + // solver_handle_, + // n, nnzA, descrA_, + // csrValA_, csrRowPtrA_, csrColIndA_, + // temp.data(), + // tol, reorder, + // x.data(), + // &singularity + // ); + + /* Using Mumps */ + std::vector host_solution(grid.ntheta()); + cudaMemcpy(host_solution.data(), x.data(), grid.ntheta() * sizeof(double), cudaMemcpyDeviceToHost); + + inner_boundary_mumps_solver_.job = JOB_COMPUTE_SOLUTION; + inner_boundary_mumps_solver_.nrhs = 1; // single rhs vector + inner_boundary_mumps_solver_.nz_rhs = grid.ntheta(); // non-zeros in rhs + inner_boundary_mumps_solver_.rhs = host_solution.data(); + inner_boundary_mumps_solver_.lrhs = grid.ntheta(); // leading dimension of rhs + dmumps_c(&inner_boundary_mumps_solver_); + if (inner_boundary_mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the system: " << inner_boundary_mumps_solver_.info[0] << std::endl; + } + cudaMemcpy(x.data(), host_solution.data(), grid.ntheta() * sizeof(double), cudaMemcpyHostToDevice); + } + + int start_black_circle_solver = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 2; + int start = start_black_circle_solver * grid.ntheta(); + int batch_count = grid.numberSmootherCircles() / 2; + int batch_stride = 2 * grid.ntheta(); + /* cusparseDgtsv2StridedBatch could run in parallel if we use different pBuffer_. */ + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + x.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + temp.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + int factor_blockSize = 256; + int factor_numBlocks = (batch_count + factor_blockSize - 1) / factor_blockSize; + computeCicleFactor_kernel<<>>( + x.data(), temp.data(), factor_, + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + start_black_circle_solver, + level_.device_grid() + ); + cudaDeviceSynchronize(); + + dim3 blockDim(16, 16); + dim3 gridDim((batch_count + blockDim.x - 1) / blockDim.x, (grid.ntheta() + blockDim.y - 1) / blockDim.y); + combineCicleSolutions_kernel<<>>( + x.data(), temp.data(), factor_, + start_black_circle_solver, level_.device_grid() + ); + cudaDeviceSynchronize(); +} + + + +void SmootherTakeGPU::solveAsc_WhiteCircle(GPU_Vector& x, const GPU_Vector& rhs, GPU_Vector& temp) +{ + const PolarGrid& grid = level_.grid(); + + const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1; + + /* Can run in parallel if needed. */ + if(start_white_circles == 0){ + /* This approach is very slow. */ + /* I wasnt able to find working analysis + solve methods in cuSparse/cuSolver. */ + /* Thus we use Mumps instead. */ + + // // Source: x, Destination: temp + // cudaMemcpy(temp.data(), x.data(), grid.ntheta() * sizeof(double), cudaMemcpyDeviceToDevice); + + // int singularity = 0; + // double tol = 1e-10; + // int reorder = 0; + + // int n = grid.ntheta(); + // int nnzA = DirBC_Interior_ ? grid.ntheta() : 4 * grid.ntheta(); + + // cusolverSpDcsrlsvchol( + // solver_handle_, + // n, nnzA, descrA_, + // csrValA_, csrRowPtrA_, csrColIndA_, + // temp.data(), + // tol, reorder, + // x.data(), + // &singularity + // ); + + /* Using Mumps */ + std::vector host_solution(grid.ntheta()); + cudaMemcpy(host_solution.data(), x.data(), grid.ntheta() * sizeof(double), cudaMemcpyDeviceToHost); + + inner_boundary_mumps_solver_.job = JOB_COMPUTE_SOLUTION; + inner_boundary_mumps_solver_.nrhs = 1; // single rhs vector + inner_boundary_mumps_solver_.nz_rhs = grid.ntheta(); // non-zeros in rhs + inner_boundary_mumps_solver_.rhs = host_solution.data(); + inner_boundary_mumps_solver_.lrhs = grid.ntheta(); // leading dimension of rhs + dmumps_c(&inner_boundary_mumps_solver_); + if (inner_boundary_mumps_solver_.info[0] != 0) { + std::cerr << "Error solving the system: " << inner_boundary_mumps_solver_.info[0] << std::endl; + } + cudaMemcpy(x.data(), host_solution.data(), grid.ntheta() * sizeof(double), cudaMemcpyHostToDevice); + } + + int start_white_circle_solver = (grid.numberSmootherCircles() % 2 == 0) ? 2 : 1; + int start = start_white_circle_solver * grid.ntheta(); + int batch_count = (grid.numberSmootherCircles()-1) / 2; + int batch_stride = 2 * grid.ntheta(); + /* cusparseDgtsv2StridedBatch could run in parallel if we use s different pBuffer_. */ + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + x.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.ntheta(), + circle_lower_diagonals_ + start, + circle_main_diagonals_ + start, + circle_upper_diagonals_ + start, + temp.data() + start, + batch_count, batch_stride, + pBuffer_ + ); + + int factor_blockSize = 256; + int factor_numBlocks = (batch_count + factor_blockSize - 1) / factor_blockSize; + computeCicleFactor_kernel<<>>( + x.data(), temp.data(), factor_, + circle_lower_diagonals_, circle_main_diagonals_, circle_upper_diagonals_, + sherman_morrison_gammas_, + start_white_circle_solver, + level_.device_grid() + ); + cudaDeviceSynchronize(); + + dim3 blockDim(16, 16); + dim3 gridDim((batch_count + blockDim.x - 1) / blockDim.x, (grid.ntheta() + blockDim.y - 1) / blockDim.y); + combineCicleSolutions_kernel<<>>( + x.data(), temp.data(), factor_, + start_white_circle_solver, level_.device_grid() + ); + cudaDeviceSynchronize(); +} \ No newline at end of file diff --git a/src/Smoother/SmootherTakeGPU/7_solveAsc_Radial.cu b/src/Smoother/SmootherTakeGPU/7_solveAsc_Radial.cu new file mode 100644 index 00000000..4d316b3d --- /dev/null +++ b/src/Smoother/SmootherTakeGPU/7_solveAsc_Radial.cu @@ -0,0 +1,41 @@ +#include "../../../include/Smoother/SmootherTakeGPU/smoother.h" + + +void SmootherTakeGPU::solveAsc_BlackRadial(GPU_Vector& x, const GPU_Vector& rhs) +{ + const PolarGrid& grid = level_.grid(); + + const int start_black_radial_solver = 0; + int start = start_black_radial_solver * grid.lengthSmootherRadial(); + int batch_count = grid.ntheta() / 2; + int batch_stride = 2 * grid.lengthSmootherRadial(); + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.lengthSmootherRadial(), + radial_lower_diagonals_ + start, + radial_main_diagonals_ + start, + radial_upper_diagonals_ + start, + x.data() + grid.numberCircularSmootherNodes() + start, + batch_count, batch_stride, pBuffer_ + ); +} + + +void SmootherTakeGPU::solveAsc_WhiteRadial(GPU_Vector& x, const GPU_Vector& rhs) +{ + const PolarGrid& grid = level_.grid(); + + const int start_white_radial_solver = 1; + int start = start_white_radial_solver * grid.lengthSmootherRadial(); + int batch_count = grid.ntheta() / 2; + int batch_stride = 2 * grid.lengthSmootherRadial(); + cusparseDgtsv2StridedBatch( + sparse_handle_, + grid.lengthSmootherRadial(), + radial_lower_diagonals_ + start, + radial_main_diagonals_ + start, + radial_upper_diagonals_ + start, + x.data() + grid.numberCircularSmootherNodes() + start, + batch_count, batch_stride, pBuffer_ + ); +} \ No newline at end of file diff --git a/src/Stencil/stencil.cpp b/src/Stencil/stencil.cpp new file mode 100644 index 00000000..4e9ce32f --- /dev/null +++ b/src/Stencil/stencil.cpp @@ -0,0 +1,17 @@ +#include "../../include/Stencil/stencil.h" + +Stencil::Stencil(std::initializer_list init) + : values_{} +{ + std::copy(init.begin(), init.end(), values_.begin()); + stencil_size_ = 0; + for (int i = 0; i < static_cast(init.size()); i++) { + if (values_[i] != -1) + stencil_size_++; + } +} + +int Stencil::operator[](StencilType type) const +{ + return values_[static_cast(type)]; +} \ No newline at end of file diff --git a/src/build_bi_aniso_rdir_phiper.cpp b/src/build_bi_aniso_rdir_phiper.cpp deleted file mode 100644 index 9aa78b52..00000000 --- a/src/build_bi_aniso_rdir_phiper.cpp +++ /dev/null @@ -1,976 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file build_bi_aniso_rdir_phiper.cpp - * \brief Implementation of the prolongation operators (deprecated) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -/*! - * \brief Applies the bilinear interpolation - * - * Applies bilinear interpolation for Dirichlet boundary conditions in - * variable r and periodic boundary conditions in phi. Can be used for a - * disk as well as for an annulus. (might be used for other geometries with - * Dirichlet boundary conditions in 'x' and periodic boundary conditions - * in 'y' as well; not tested!) - * - * uses Anisotropic Bilinear Interpolation stencil - * for isotropic mesh, anisotropic stencil reduces to isotropic definition - * ]1 2 1[ - * 1/4 ]2 4 2[ - * ]1 2 1[ - * - * \param u: vector to prolongate/restrict - * \param mc: coarse size of prolongator (level->mc) - * \param ncoarse: fine size of prolongator (level->m) - * \param coarse_r: vector(m), contains -1 if fine nodes, else the coordinate r of coarse nodes (level->coarse_nodes_list_r) - * \param coarse_theta: idem with theta coordinates (level->coarse_nodes_list_theta) - * \param trans: should we prolongate (P) or restrict (R=Pt) - * - */ -std::vector level::apply_prolongation_bi0(std::vector u, int mc, int ncoarse, std::vector coarse_r, - std::vector coarse_theta, int trans) -{ - std::vector Pu; - if (trans == 0) { //Prolongation (P * u = Pu), (m x mc) * mc = m - Pu = std::vector(m, 0); - } - else if (trans == 1) { //Restriction (P^T * u = Pu), (mc x m) * m = mc - Pu = std::vector(mc, 0); - } - - int index = 0; - int start_node_loop = 0; - int max_row_indices_act = 0; - int coarse_index = 0; - - int row_index; - int col_index_base; - int ri, ci; - double vi; - - for (int k = start_node_loop; k < ncoarse; k++) { - - if (coarse_r[k] > -1) { // Coarse Node; no interpolation necessary - - row_index = max_row_indices_act; - col_index_base = coarse_index; - ri = row_index; - ci = col_index_base; // u(r,phi) - vi = 1; // 4/4 - - if (trans) { - Pu[ci] += vi * u[ri]; - } - else - Pu[ri] += vi * u[ci]; - index++; - max_row_indices_act++; - coarse_index++; - } - else { // only fine node - // alt: r0=0/origin_NOT_coarse - int phi_index_prev, r_index_1_prev, r_index_1_next; - int coarse_nodes_prevCirc, coarse_nodes_nexCirc, ncoarse_2prevCirc; - double phi_next, h_prev, h_next, k_prev, k_next; - - if (coarse_r[k - 1] > -1 && - ((k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) || - (k - ntheta_int + 1 >= 0 && coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0))) { - // previous (k-1) and following (either k+1 or k-nphi+1) nodes are coarse and have the same - // radius r; interpolation between u(phi-k) and u(phi+k) - // no periodicity workaround for phi-l since first node (r,0) - // on each circle (where coarse nodes are present) is always coarse! - // periodicity for phi+k handled below - // r_index_1_bef = c(k-1,1)+1; % index in r (starting with 1); r_indices are 0 based otherwise. - - phi_index_prev = coarse_theta[k - 1]; // index one before phi_k - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - phi_next = theta[coarse_theta[k + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - - // u(phi-k) - col_index_base = coarse_index; - - ri = row_index; - ci = col_index_base - 1; // u(r,phi-k) (voriger Coarse Node) - vi = k_next / (k_prev + k_next); // 1/2 - - max_row_indices_act = row_index + 1; - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - - // u(phi+k) - ri = row_index; - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - ci = col_index_base; // u(r,phi+k) (next or currently 'considered' Coarse Node) - else if (coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0) - ci = col_index_base - ceil(ntheta_int / 2); // periodicity - else { - std::cout << "In build_bi_aniso_rDirphiPer (k=" << k << "): should not be entered.\n"; - throw std::runtime_error("In build_bi_aniso_rDirphiPer: should not be entered."); - } - vi = k_prev / (k_prev + k_next); // 1/2 - - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - } - // HERE - else if (coarse_r[k - ntheta_int] > -1 && - coarse_theta[k - ntheta_int] - coarse_theta[k + ntheta_int] == 0) { - - // corresp. coarse nodes with same phi are at r-h and r+h - // interpolation between u(r-h) and u(r+h) - // previous index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_prev = coarse_r[k - ntheta_int]; - // next index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_next = coarse_r[k + ntheta_int]; - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - // u(r-h) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int; i < k + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi) - // not touching boundary, standard case %% if/else with changed values should be bullshit; removing later - vi = h_next / (h_prev + h_next); // 1/2 - max_row_indices_act = row_index + 1; // update max - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - } - - // u(r+h) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - coarse_nodes_nexCirc = 0; - for (int i = k; i < k + ntheta_int + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi) - // not touching boundary, standard case %% if/else with changed values should be bullshit; removing later - vi = h_prev / (h_prev + h_next); // 1/2 - - max_row_indices_act = row_index + 1; // update max - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - } - // weighing with 1/4 from all 'diagonally adjacent' coarse node - // for standard coarsening this is in fact 0.5x the previous interpolated fine node - // plus 0.5x the next (...taking periodicity into account!) interpolated fine node - // ...thus take formula from previous elseif and change - // correspondingly. - } - else { - // previous index in r (starting with 1); r_indices are 0 based otherwise. - - r_index_1_prev = coarse_r[k - ntheta_int - 1]; - // next index in r (starting with 1); r_indices are 0 based otherwise - // (take -1 instead of +1 (attention to periodic BC!) to not go one circle to far) - r_index_1_next = coarse_r[k + ntheta_int - 1]; - - // index one before phi_k (access is possible via 'k-nphi-1' since subsequent if should never be entered) - phi_index_prev = coarse_theta[k - ntheta_int - 1]; - - // means that first node on r-circle with (r,phi)=(r,0) is a fine node and does not have adjacent coarse nodes at (r-h,0) and (r+h,0) - // [jump across periodic bc had to be respected; not implemented; must and shall not appear with current coarsening] - if (std::min(coarse_theta[k - ntheta_int - 1], coarse_theta[k - ntheta_int + 1]) > -1 && - coarse_theta[k - ntheta_int - 1] > coarse_theta[k - ntheta_int + 1]) - std::cout << "WARNING: Coarsening strategy has to be adapted for bilinear interpolation\n"; - if (phi_index_prev + 1 < ntheta_int - 1) - phi_next = theta[coarse_theta[k + ntheta_int + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; // h_{i-1} - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; // h_{i-1} - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; // h_{i} - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; // h_{i} - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - // u(r-h,phi-h) - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int - 1; i < k; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi-h) - vi = h_next * k_next / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - max_row_indices_act = row_index + 1; // update max - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - - // u(r-h,phi+h) - ri = row_index; - // coarse node at (r-h,phi-h) is at phi=nphi-1, so 'next' coarse - // node at (r-h,phi+h) is at (r-h,0) since phi=2pi-h - // %%%%%%%%%%%%%%%%%%%%%%%%% Hier Fehler k-2*nphi:k=0,.... - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) { - ncoarse_2prevCirc = 0; - for (int i = k - 2 * ntheta_int + 1; i < k - 1; i++) - if (coarse_r[i] > -1) - ncoarse_2prevCirc += 1; - ci = col_index_base - ncoarse_2prevCirc; // Coarse Node u(r-h,phi+h) - } - else - ci = col_index_base - coarse_nodes_prevCirc + 1; // Coarse Node u(r-h,phi+h) - // not touching boundary, standard case - vi = h_next * k_prev / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - } - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - // u(r+h,phi-h) - coarse_nodes_nexCirc = 0; - for (int i = k + 1; i < k + ntheta_int + 1; i++) { - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - } - - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi-h) - vi = h_prev * k_next / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - max_row_indices_act = row_index + 1; // update max - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - - // u(r+h,phi+h) - ri = row_index; - // 'next' coarse node at (..,phi+h) is at (..,0) since phi=2pi-h; - // corresp. index equals coarse_index since this is the index of the next coarse node - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) - ci = col_index_base; // u(r+h,phi-h) - else - ci = col_index_base + coarse_nodes_nexCirc; // u(r+h,phi-h) - vi = h_prev * k_prev / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - } - } - } - } - - return Pu; -} /* ----- end of level::apply_prolongation_bi0 ----- */ - -/*! - * \brief Applies the injection - * - * Applies injection: directly inject values of coarse nodes. - * Just uses values 1.0 for nodes of type 0. - * - * \param u: vector to prolongate/restrict - * \param mc: coarse size of prolongator (level->mc) - * \param ncoarse: fine size of prolongator (level->m) - * \param coarse_r: vector(m), contains -1 if fine nodes, else the coordinate r of coarse nodes (level->coarse_nodes_list_r) - * \param coarse_theta: idem with theta coordinates (level->coarse_nodes_list_theta) - * \param trans: should we prolongate (P) or restrict (R=Pt) - * - */ -std::vector level::apply_prolongation_inj0(std::vector u, int mc, int ncoarse, - std::vector coarse_r, std::vector coarse_theta, int trans) -{ - std::vector Pu; - if (trans == 0) { //Prolongation (P * u = Pu), (m x mc) * mc = m - Pu = std::vector(m, 0); - } - else if (trans == 1) { //Restriction (P^T * u = Pu), (mc x m) * m = mc - Pu = std::vector(mc, 0); - } - - // Beware ! we only consider the m-th first elements in ncoarse_lists_*: - // ncoarse_lists{i+1}(nodes_remain{i},:) - - int index = 0; - // alt: r0=0/origin_NOT_coarse - int start_node_loop = 0; - int max_row_indices_act = 0; - int coarse_index = 0; - - int row_index; - int col_index_base; - int ri, ci; - double vi; - - for (int k = start_node_loop; k < ncoarse; k++) { - //! CASE 1: Coarse Node; no interpolation necessary - if (coarse_r[k] > -1) { // Coarse Node; no interpolation necessary - - row_index = max_row_indices_act; - col_index_base = coarse_index; - ri = row_index; - ci = col_index_base; // u(r,phi) - vi = 1.0; // 4/4 - - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - max_row_indices_act++; - coarse_index++; - } - else { // only fine node - // alt: r0=0/origin_NOT_coarse - int phi_index_prev, r_index_1_prev, r_index_1_next; - int coarse_nodes_prevCirc, coarse_nodes_nexCirc, ncoarse_2prevCirc; - double phi_next, h_prev, h_next, k_prev, k_next; - - //! CASE 2 - if (coarse_r[k - 1] > -1 && - ((k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) || - (k - ntheta_int + 1 >= 0 && coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0))) { - // previous (k-1) and following (either k+1 or k-nphi+1) nodes are coarse and have the same - // radius r; interpolation between u(phi-k) and u(phi+k) - // no periodicity workaround for phi-l since first node (r,0) - // on each circle (where coarse nodes are present) is always coarse! - // periodicity for phi+k handled below - // r_index_1_bef = c(k-1,1)+1; % index in r (starting with 1); r_indices are 0 based otherwise. - - phi_index_prev = coarse_theta[k - 1]; // index one before phi_k - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - phi_next = theta[coarse_theta[k + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - - //! u(phi-k) - col_index_base = coarse_index; - - ri = row_index; - ci = col_index_base - 1; // u(r,phi-k) (voriger Coarse Node) - vi = k_next / (k_prev + k_next); // 1/2 - - max_row_indices_act = row_index + 1; - index++; - - //! u(phi+k) - ri = row_index; - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - ci = col_index_base; // u(r,phi+k) (next or currently 'considered' Coarse Node) - else if (coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0) - ci = col_index_base - ceil(ntheta_int / 2); // periodicity - else { - std::cout << "In build_bi_aniso_rDirphiPer (k=" << k << "): should not be entered.\n"; - throw std::runtime_error("In build_bi_aniso_rDirphiPer: should not be entered."); - } - vi = k_prev / (k_prev + k_next); // 1/2 - - index++; - } - //! CASE 3 - else if (coarse_r[k - ntheta_int] > -1 && - coarse_theta[k - ntheta_int] - coarse_theta[k + ntheta_int] == 0) { - - // corresp. coarse nodes with same phi are at r-h and r+h - // interpolation between u(r-h) and u(r+h) - // previous index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_prev = coarse_r[k - ntheta_int]; - // next index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_next = coarse_r[k + ntheta_int]; - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - //! u(r-h) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int; i < k + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi) - // not touching boundary, standard case %% if/else with changed values should be bullshit; removing later - vi = h_next / (h_prev + h_next); // 1/2 - max_row_indices_act = row_index + 1; // update max - index++; - } - - //! u(r+h) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - coarse_nodes_nexCirc = 0; - for (int i = k; i < k + ntheta_int + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi) - // not touching boundary, standard case %% if/else with changed values should be bullshit; removing later - vi = h_prev / (h_prev + h_next); // 1/2 - - max_row_indices_act = row_index + 1; // update max - index++; - } - // weighing with 1/4 from all 'diagonally adjacent' coarse node - // for standard coarsening this is in fact 0.5x the previous interpolated fine node - // plus 0.5x the next (...taking periodicity into account!) interpolated fine node - // ...thus take formula from previous elseif and change - // correspondingly. - } - //! CASE 4 - else { - // previous index in r (starting with 1); r_indices are 0 based otherwise. - - r_index_1_prev = coarse_r[k - ntheta_int - 1]; - // next index in r (starting with 1); r_indices are 0 based otherwise - // (take -1 instead of +1 (attention to periodic BC!) to not go one circle to far) - r_index_1_next = coarse_r[k + ntheta_int - 1]; - - // index one before phi_k (access is possible via 'k-nphi-1' since subsequent if should never be entered) - phi_index_prev = coarse_theta[k - ntheta_int - 1]; - - // means that first node on r-circle with (r,phi)=(r,0) is a fine node and does not have adjacent coarse nodes at (r-h,0) and (r+h,0) - // [jump across periodic bc had to be respected; not implemented; must and shall not appear with current coarsening] - if (std::min(coarse_theta[k - ntheta_int - 1], coarse_theta[k - ntheta_int + 1]) > -1 && - coarse_theta[k - ntheta_int - 1] > coarse_theta[k - ntheta_int + 1]) - std::cout << "WARNING: Coarsening strategy has to be adapted for bilinear interpolation\n"; - if (phi_index_prev + 1 < ntheta_int - 1) - phi_next = theta[coarse_theta[k + ntheta_int + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; // h_{i-1} - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; // h_{i-1} - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; // h_{i} - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; // h_{i} - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - // u(r-h,phi-h) - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int - 1; i < k; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi-h) - vi = h_next * k_next / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - max_row_indices_act = row_index + 1; // update max - index++; - - // u(r-h,phi+h) - ri = row_index; - // coarse node at (r-h,phi-h) is at phi=nphi-1, so 'next' coarse - // node at (r-h,phi+h) is at (r-h,0) since phi=2pi-h - // %%%%%%%%%%%%%%%%%%%%%%%%% Hier Fehler k-2*nphi:k=0,.... - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) { - ncoarse_2prevCirc = 0; - for (int i = k - 2 * ntheta_int + 1; i < k - 1; i++) - if (coarse_r[i] > -1) - ncoarse_2prevCirc += 1; - ci = col_index_base - ncoarse_2prevCirc; // Coarse Node u(r-h,phi+h) - } - else - ci = col_index_base - coarse_nodes_prevCirc + 1; // Coarse Node u(r-h,phi+h) - // not touching boundary, standard case - vi = h_next * k_prev / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - index++; - } - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - // u(r+h,phi-h) - coarse_nodes_nexCirc = 0; - for (int i = k + 1; i < k + ntheta_int + 1; i++) { - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - } - - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi-h) - vi = h_prev * k_next / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - - max_row_indices_act = row_index + 1; // update max - index++; - - // u(r+h,phi+h) - ri = row_index; - // 'next' coarse node at (..,phi+h) is at (..,0) since phi=2pi-h; - // corresp. index equals coarse_index since this is the index of the next coarse node - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) - ci = col_index_base; // u(r+h,phi-h) - else - ci = col_index_base + coarse_nodes_nexCirc; // u(r+h,phi-h) - vi = h_prev * k_prev / ((k_prev + k_next) * (h_prev + h_next)); // isotrop: 1/4 - index++; - } - } - } - } - - return Pu; -} /* ----- end of level::apply_prolongation_inj0 ----- */ - -/*! - * \brief Applies the extrapolation operator - * - * Applies the prolongation operator for implicit extrapolation. - * - * The stencil is the same as the isotropic bilinear interpolation stencil, - * except for fine points with diagonal coarse neighboors (types 5,6,7) where only - * top_left and top_right values are used. - * - * \param u: vector to prolongate/restrict - * \param mv: coarse size of prolongator (level->mc) - * \param ncoarse: fine size of prolongator (level->m) - * \param coarse_r: vector(m), contains -1 if fine nodes, else the coordinate r of coarse nodes (level->coarse_nodes_list_r) - * \param coarse_theta: idem with theta coordinates (level->coarse_nodes_list_theta) - * \param trans: should we prolongate (P) or restrict (R=Pt) - * - */ -std::vector level::apply_prolongation_ex0(std::vector u, int mc, int ncoarse, std::vector coarse_r, - std::vector coarse_theta, int trans) -{ - std::vector Pu; - if (trans == 0) { //Prolongation (P * u = Pu), (m x mc) * mc = m - Pu = std::vector(m, 0); - } - else if (trans == 1) { //Restriction (P^T * u = Pu), (mc x m) * m = mc - Pu = std::vector(mc, 0); - } - - // Beware ! we only consider the m-th first elements in ncoarse_lists_*: - // ncoarse_lists{i+1}(nodes_remain{i},:) - - int index = 0; - int start_node_loop = 0; - int max_row_indices_act = 0; - int coarse_index = 0; - - int row_index; - int col_index_base; - int ri, ci; - double vi; - - for (int k = start_node_loop; k < ncoarse; k++) { - //! CASE 1: Coarse Node; no interpolation necessary (coarse node = fine node) - if (coarse_r[k] > -1) { // Coarse Node; no interpolation necessary - - row_index = max_row_indices_act; - col_index_base = coarse_index; - ri = row_index; - ci = col_index_base; // u(r,phi) - vi = 1.0; // 4/4 - - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - index++; - max_row_indices_act++; - coarse_index++; - } - else { // only fine nodes - //check if the fine node has a diagonal link to a coarse node - int diagonal_link = 0; //indicates wheather a fine node has a diagonal link or not - int i = k % ntheta_int; - int j = floor(k / ntheta_int); - if (i % 2 == 1 && j % 2 == 1) - diagonal_link = 1; - - // alt: r0=0/origin_NOT_coarse - int phi_index_prev, r_index_1_prev, r_index_1_next; - int coarse_nodes_prevCirc, coarse_nodes_nexCirc, ncoarse_2prevCirc; - double phi_next, h_prev, h_next, k_prev, k_next; - - //! CASE 2: fine nodes which have coarse points to the right and to the left - if (coarse_r[k - 1] > -1 && - ((k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) || - (k - ntheta_int + 1 >= 0 && coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0))) { - // previous (k-1) and following (either k+1 or k-nphi+1) nodes are coarse and have the same - // radius r; interpolation between u(phi-k) and u(phi+k) - // no periodicity workaround for phi-l since first node (r,0) - // on each circle (where coarse nodes are present) is always coarse! - // periodicity for phi+k handled below - // r_index_1_bef = c(k-1,1)+1; % index in r (starting with 1); r_indices are 0 based otherwise. - - phi_index_prev = coarse_theta[k - 1]; // index one before phi_k - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - phi_next = theta[coarse_theta[k + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - - //! u(phi-k) (left) - col_index_base = coarse_index; - - ri = row_index; - ci = col_index_base - 1; // u(r,phi-k) (voriger Coarse Node) - vi = 0.5; - - max_row_indices_act = row_index + 1; - if (diagonal_link == 0) { - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - - // u(phi+k) (right) - ri = row_index; - if (k + 1 < ncoarse && coarse_r[k - 1] - coarse_r[k + 1] == 0) - ci = col_index_base; // u(r,phi+k) (next or currently 'considered' Coarse Node) - else if (coarse_r[k - 1] - coarse_r[k - ntheta_int + 1] == 0) - ci = col_index_base - ceil(ntheta_int / 2); // periodicity - else { - std::cout << "In build_bi_aniso_rDirphiPer (k=" << k << "): should not be entered.\n"; - throw std::runtime_error("In build_bi_aniso_rDirphiPer: should not be entered."); - } - vi = 0.5; - - if (diagonal_link == 0) { - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - } - //! CASE 3: fine nodes which have coarse points at the top and bottom side - else if (coarse_r[k - ntheta_int] > -1 && - coarse_theta[k - ntheta_int] - coarse_theta[k + ntheta_int] == 0) { - - // corresp. coarse nodes with same phi are at r-h and r+h - // interpolation between u(r-h) and u(r+h) - // previous index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_prev = coarse_r[k - ntheta_int]; - // next index in r (starting with 1); r_indices are 0 based otherwise. - r_index_1_next = coarse_r[k + ntheta_int]; - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - //! u(r-h) (bottom) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int; i < k + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi) - vi = 0.5; - - max_row_indices_act = row_index + 1; // update max - if (diagonal_link == 0) { - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - } - - //! u(r+h) (top) - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - coarse_nodes_nexCirc = 0; - for (int i = k; i < k + ntheta_int + 1; i++) - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi) - vi = h_prev / (h_prev + h_next); // 1/2 - vi = 0.5; - - max_row_indices_act = row_index + 1; // update max - if (diagonal_link == 0) { - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - } - // weighing with 1/4 from all 'diagonally adjacent' coarse node - // for standard coarsening this is in fact 0.5x the previous interpolated fine node - // plus 0.5x the next (...taking periodicity into account!) interpolated fine node - // ...thus take formula from previous elseif and change - // correspondingly. - } - //! CASE 4: fine nodes which have coarse points only diagonally - else { - // previous index in r (starting with 1); r_indices are 0 based otherwise. - - r_index_1_prev = coarse_r[k - ntheta_int - 1]; - // next index in r (starting with 1); r_indices are 0 based otherwise - // (take -1 instead of +1 (attention to periodic BC!) to not go one circle to far) - r_index_1_next = coarse_r[k + ntheta_int - 1]; - - // index one before phi_k (access is possible via 'k-nphi-1' since subsequent if should never be entered) - phi_index_prev = coarse_theta[k - ntheta_int - 1]; - - // means that first node on r-circle with (r,phi)=(r,0) is a fine node and does not have adjacent coarse nodes at (r-h,0) and (r+h,0) - // [jump across periodic bc had to be respected; not implemented; must and shall not appear with current coarsening] - if (std::min(coarse_theta[k - ntheta_int - 1], coarse_theta[k - ntheta_int + 1]) > -1 && - coarse_theta[k - ntheta_int - 1] > coarse_theta[k - ntheta_int + 1]) - std::cout << "WARNING: Coarsening strategy has to be adapted for bilinear interpolation\n"; - if (phi_index_prev + 1 < ntheta_int - 1) - phi_next = theta[coarse_theta[k + ntheta_int + 1]]; // index one after phi_k - else - phi_next = 2 * PI; // index one after phi_k (periodic bc come in) - - if (r_index_1_prev < 0) - h_prev = r[r_index_1_prev + 1] - gyro::dcntl[Param::r0_DB]; // h_{i-1} - else - h_prev = r[r_index_1_prev + 1] - r[r_index_1_prev]; // h_{i-1} - if (r_index_1_next + 1 > nr_int) - h_next = gyro::dcntl[Param::R] - r[r_index_1_prev + 1]; // h_{i} - else - h_next = r[r_index_1_next] - r[r_index_1_prev + 1]; // h_{i} - - k_prev = theta[phi_index_prev + 1] - theta[phi_index_prev]; - k_next = phi_next - theta[phi_index_prev + 1]; - - row_index = max_row_indices_act; - col_index_base = coarse_index; - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_prev > 0) { - //! u(r-h,phi-h) (bottom left) - coarse_nodes_prevCirc = 0; - for (int i = k - ntheta_int - 1; i < k; i++) - if (coarse_r[i] > -1) - coarse_nodes_prevCirc += 1; - - ri = row_index; - ci = col_index_base - coarse_nodes_prevCirc; // Coarse Node u(r-h,phi-h) - vi = 0.5; - - max_row_indices_act = row_index + 1; // update max - if (diagonal_link == -1) { //should not be treated - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - - //! u(r-h,phi+h) (bottom right) - ri = row_index; - // coarse node at (r-h,phi-h) is at phi=nphi-1, so 'next' coarse - // node at (r-h,phi+h) is at (r-h,0) since phi=2pi-h - // %%%%%%%%%%%%%%%%%%%%%%%%% Hier Fehler k-2*nphi:k=0,.... - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) { - ncoarse_2prevCirc = 0; - for (int i = k - 2 * ntheta_int + 1; i < k - 1; i++) - if (coarse_r[i] > -1) - ncoarse_2prevCirc += 1; - ci = col_index_base - ncoarse_2prevCirc; // Coarse Node u(r-h,phi+h) - } - else - ci = col_index_base - coarse_nodes_prevCirc + 1; // Coarse Node u(r-h,phi+h) - // not touching boundary, standard case - vi = 0.5; - - if (diagonal_link == 1) { - if (trans) { - Pu[ci] += vi * u[ri]; - } - else { - Pu[ri] += vi * u[ci]; - } - } - index++; - } - - // do not introduce interactions between interior nodes and boundary nodes. - // Correction of boundary to interior zero anyway (since residual is zero); - // introduction of interior values to boundary nodes is not intended, so do not do it ! - if (r_index_1_next + 1 < nr_int) { - //! u(r+h,phi-h) (top left) - coarse_nodes_nexCirc = 0; - for (int i = k + 1; i < k + ntheta_int + 1; i++) { - if (coarse_r[i] > -1) - coarse_nodes_nexCirc += 1; - } - - ri = row_index; - ci = col_index_base + coarse_nodes_nexCirc - 1; // u(r+h,phi-h) - vi = 0.5; - - max_row_indices_act = row_index + 1; // update max - if (diagonal_link == 1) { - if (trans) { - Pu[ci] += vi * u[ri]; - } - else { - Pu[ri] += vi * u[ci]; - } - } - index++; - - //! u(r+h,phi+h) (top right) - ri = row_index; - // 'next' coarse node at (..,phi+h) is at (..,0) since phi=2pi-h; - // corresp. index equals coarse_index since this is the index of the next coarse node - if (coarse_theta[k - 1 - ntheta_int] + 1 == ntheta_int - 1) - ci = col_index_base; // u(r+h,phi-h) - else - ci = col_index_base + coarse_nodes_nexCirc; // u(r+h,phi-h) - vi = 0.5; - - if (diagonal_link == -1) { //should not be treated - if (trans) - Pu[ci] += vi * u[ri]; - else - Pu[ri] += vi * u[ci]; - } - index++; - } - } - } - } - - return Pu; -} /* ----- end of level::apply_prolongation_ex0 ----- */ \ No newline at end of file diff --git a/src/build_fd9star_anisotr_scaled.cpp b/src/build_fd9star_anisotr_scaled.cpp deleted file mode 100644 index a8abecd4..00000000 --- a/src/build_fd9star_anisotr_scaled.cpp +++ /dev/null @@ -1,954 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file build_fd9star_anisotr_scaled.cpp - * \brief Implementation of the 9p FD operators A and RHS (deprecated) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -/*! - * \brief Build the operator and RHS (deprecated) - * - * Builds the matrix A and the RHS of the system based on 9p FD. Relations with - * Dirichlet boundary condition nodes are shifted to the RHS to keep a symmetric - * operator. - * - * everything expressed in polar coordinates - * allows anisotropy in r - * - r: array of discretized r values - * - ntheta: number of discretization intervals in angle phi (also variable m) - * - * solves the transformed DGL: r*u_rr + u_r + 1/r*u_phiphi = rf fuer r>0, r<=1, - * fuer r=0, approximate: u_0 = 1/m sum_j u(h,jk)-(h/2)^2*f - * sorting of nodes ringwise. first node origin, last ntheta - * Node all the way out - * - */ -void level::build_A0() -{ - // if boundary is only defined on radius, checks for wrongly detected boundary - // nodes due to rounding errors (double checking...) - double tol_bound_check = gyro::dcntl[Param::tol_bound_check]; - // double x, y; - int index; - - // Take boundary condition into account - // In the operator - // gyro::trafo(r[0], theta[0], x, y, 0); - // alt: r0=0/neumBound - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { - // Dirichlet-RB (intérieur ; premier noeud dans la numérotation des disques) - for (int i = 0; i < ntheta_int; i++) { - row_indices.push_back(i); - col_indices.push_back(i); - vals.push_back(1.0); - } - index = ntheta_int; - } - else { - index = 0; - } - - // gyro::trafo(r[0], theta[0], x, y, 0); - // alt: r0=0/neumBound - int start_j = 0; - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { - start_j = 1; - } - // dirBound([r(1),0])>0 means that (r(1),0) is not on Dirichlet boundary - else if (r[0] > 0 && fabs(gyro::distBoundary(r[0], theta[0], 0)) > tol_bound_check) { - start_j = 0; - } - - // int i1 = 0, i2 = 0; - for (int j = start_j; j < nr_int; j++) { // nodes of Disk K(eps,1-eps) - for (int i = 0; i < ntheta_int; i++) { - // alt: r0=0 - int row_index = j * ntheta_int + i; - - // % ==================== % - double kt = thetaplus[i]; - double thetamin1, ktmin1, hs, hsmin1; - if (i > 0) { - thetamin1 = theta[i - 1]; - ktmin1 = thetaplus[i - 1]; - } - else { - thetamin1 = theta[ntheta_int - 1]; // equal to 2*PI-ktmin1 - ktmin1 = thetaplus[ntheta_int - 1]; - } - // % -------------------- % - // r(j+1) is the current r - hs = hplus[j]; - if (j > 0) - hsmin1 = hplus[j - 1]; - else - hsmin1 = 2 * r[0]; // across the origin - // % ==================== % - - // 9-Point Stencil (attention order; first bottom, then right, then top right, top left, bottom left, middle) - // r-h- (h- = x_i-x_i-1) - // if (j == 1) - // gyro::trafo(r[j - 1], theta[i], x, y, 0); - - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r[j - 1], theta[i], 0)) < tol_bound_check) { - } - else { - // row_indices[index] = row_index; - row_indices.push_back(row_index); - col_indices.push_back(-42); - vals.push_back(-42); - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - if (j > 1 || (j == 1 && r[0] > 0)) - // to u at r-h geometrically recorded (i.e. -ntheta_int nodes at slice sorting) - col_indices[index] = row_index - ntheta_int; - else { // j=0 or j=1 - if (r[0] == 0) { // all refering to the single origin node! (j=0 not possible in this case) - // Reference to u at r-h=0 geometrically recorded (for all i the origin, because here r=h) - col_indices[index] = 1; - } - else if (j == 0) { // across the origin - if (i + 1 > ntheta_int / 2) { - col_indices[index] = row_index - ntheta_int / 2; // half a turn back - } - else { - col_indices[index] = row_index + ntheta_int / 2; // half a turn further - } - } - } - - if (j > 0) { - // alt: neumBC - // a l interieur sans contact aux conditions aux limites - vals[index] = - -0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)); - } - else { - // j==0; across the origin - // just use r_{s-1}=0 - // Use r(0):=r(j) to go to the other side of the origin - vals[index] = - -0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)); - } - index++; - } - - // (r-h-,phi-k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - // if (j == 1) // coords necessary for potential boundary conditions - // gyro::trafo(r[j - 1], thetamin1, x, y, 0); // r(j) is PREVIOUS r, actual is r(J+1) ! - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r[j - 1], thetamin1, 0)) < tol_bound_check) { - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - // but no dirichlet bc on innermost circle - if (j > 1 || (j == 1 && r[0] > 0)) { - row_indices.push_back(row_index); - if (i > 0) // next node in theta direction but one circle before - col_indices.push_back(row_index - ntheta_int - 1); - else // periodicity condition - col_indices.push_back(row_index - 1); - } - - // if j > 0 - // alt: neumBound - if (j > 1 || (j == 1 && r[0] > 0)) { - // a l interieur sans contact aux conditions aux limites - // if (j > 1) // pas de reference vers l origine ici - vals.push_back(-(gyro::art(r[j], thetamin1, 0) + gyro::art(r[j - 1], theta[i], 0))); - index++; - } - } - } - - // phi-k - // row_indices[index] = row_index; - row_indices.push_back(row_index); - if (i > 0) // previous node in phi direction - col_indices.push_back(row_index - 1); - else // periodicity condition - col_indices.push_back(row_index + ntheta_int - 1); - vals.push_back(-0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) - - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0))); - index++; - - // (r+h+,phi-k) (en haut a droite) - if (gyro::icntl[Param::mod_pk] > 0) { - double theta_eval_prelast = 0; - double r_tmp, theta_tmp; - if (i > 0) { // not the first node on the corresponding circle; we can take theta(i-1) - // gyro::trafo(r[j + 1], theta[i - 1], x, y, 0); - r_tmp = r[j + 1]; - theta_tmp = theta[i - 1]; - } - else { - theta_eval_prelast = theta[ntheta_int - 1]; - // gyro::trafo(r[j + 1], theta_eval_prelast, x, y, 0); - r_tmp = r[j + 1]; - theta_tmp = theta_eval_prelast; - } - - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r_tmp, theta_tmp, 0)) > tol_bound_check)) { - // row_indices[index] = row_index; - row_indices.push_back(row_index); - if (i > 0) // previous node in phi direction but at r+h - col_indices.push_back(row_index + ntheta_int - 1); - else // first node on corresponding circle; pay gyro::attention to periodicity condition! - col_indices.push_back(row_index + 2 * ntheta_int - 1); - vals.push_back(gyro::art(r[j], thetamin1, 0) + gyro::art(r[j + 1], theta[i], 0)); - index++; - } - } - - // // r + h+ (h+ = x_i+1-x_i) - // gyro::trafo(r[j + 1], theta[i], x, y, 0); - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) > tol_bound_check)) { - row_indices.push_back(row_index); - col_indices.push_back(row_index + ntheta_int); // zu u bei r+h - vals.push_back(-0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) - - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0))); - index++; - } - - // (r+h+,phi+k) (en haut a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - double thetap1 = 0; - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - - // gyro::trafo(r[j + 1], thetap1, x, y, 0); ??? - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) > tol_bound_check)) { - row_indices.push_back(row_index); - if (i + 1 < ntheta_int) // previous node in phi direction but at r+h - col_indices.push_back(row_index + ntheta_int + 1); - else // first node on corresponding circle; pay gyro::attention to periodicity condition! - col_indices.push_back(row_index + 1); - vals.push_back(-gyro::art(r[j + 1], theta[i], 0) - gyro::art(r[j], thetap1, 0)); - index++; - } - } - - // phi+k - double thetap1, r_tmp, theta_tmp; - // row_indices[index] = row_index; - row_indices.push_back(row_index); - if (i + 1 < ntheta_int) // next node in theta direction - col_indices.push_back(row_index + 1); - else // periodicity condition - col_indices.push_back(row_index - ntheta_int + 1); - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - vals.push_back(-0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) - - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0))); - index++; - - // (r-h-,phi+k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - if (j == 1) { // coords necessary for potential boundary conditions - if (i + 1 < ntheta_int) { - // gyro::trafo(r[j - 1], theta[i + 1], x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = theta[i + 1]; - } - else { - double pi2 = 2 * PI; - // gyro::trafo(r[j - 1], pi2, x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = pi2; - } - } - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - // j=1 means r-h is on the boundary, gyro::distBoundary([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r_tmp, theta_tmp, 0)) < tol_bound_check) { - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) but no dirichlet bc on innermost circle - if (j > 1 || (j == 1 && r[0] > 0)) { - row_indices.push_back(row_index); - if (i + 1 < ntheta_int) // next node in theta direction but one circle before - col_indices.push_back(row_index - ntheta_int + 1); - else { // periodicity condition - col_indices.push_back(row_index - 2 * ntheta_int + 1); - } - } - - // alt: neumBC - if (j > 1 || (j == 1 && r[0] > 0)) { - // a l'interieur sans contact aux conditions aux limites - // if j > 1 // pas de reference vers l'origine ici - vals.push_back(gyro::art(r[j - 1], theta[i], 0) + gyro::art(r[j], thetap1, 0)); - index++; - } - } - } - - // (r,phi) - row_indices.push_back(row_index); - col_indices.push_back(row_index); - - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - if (j > 0) { - // alt: neumBound - - vals.push_back(0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * ktmin1 / hsmin1 * - (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0))); - } - else { //across the origin; j=0 - - vals.push_back(0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0))); - if (i + 1 > ntheta_int / 2) - vals[index] += - 0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)); - else // to make it symmetric, take values from second half circle - vals[index] += - 0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)); - } - - vals[index] += betaVec[row_index]; - index++; - } - } - - int size_ri = row_indices.size(); - int realsize_indices = 0; - for (int i = 0; i < size_ri; i++) - if (row_indices[i] > realsize_indices) - realsize_indices = row_indices[i]; - - // Dirichlet-RB (outside; last node in slice numbering) - double t_tmp = 0; - // gyro::trafo(r[nr_int], t_tmp, x, y, 0); - if (fabs(gyro::distBoundary(r[nr_int], t_tmp, 0)) < - tol_bound_check) { // dirBound([r(n+1),0])==0 means that (r(n+1),0) is on Dirichlet boundary - // if (bound_def_rad && r[nr_int] != Rmax) - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // alt: r0=0 ? - double ri_end = row_indices[size_ri - 1]; - for (int i = 0; i < ntheta_int; i++) { - row_indices.push_back(ri_end + i + 1); - col_indices.push_back(ri_end + i + 1); // Matlab format.... - vals.push_back(1.0); - } - } -} /* ----- end of level::build_A0 ----- */ - -/*! - * \brief Build the RHS (deprecated) - * - * Builds the RHS of the system based on 9p FD. Relations with Dirichlet boundary - * condition nodes are shifted to the RHS to keep a symmetric operator. - * - */ -void level::build_rhs0() -{ - // Take boundary condition into account - - // created transformed vector from original right side - // zu -Laplace(u) = f to K(0,1) after transformed to polar coordinates, then - // right side for r in [eps, 1-eps]: r*f(r,phi) (values in loop below) - // D_scal_rhs = ones(global_size,1); % save h and k dependent scaling of the right side - // alt: r0=0/neumBound - int start_j; - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (gyro::icntl[Param::DirBC_Interior]) { - start_j = 1; - } - // dirBound([r(1),0])>0 means that (r(1),0) is not on Dirichlet boundary - else if (r[0] > 0 && !gyro::icntl[Param::DirBC_Interior]) { - start_j = 0; - } - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (gyro::icntl[Param::DirBC_Interior]) { - for (int i = 0; i < ntheta_int; i++) { - // Dirichlet-RB inside % one value for each point inside (Dirichlet-RB), i.e. ntheta_int-many - fVec.push_back(gyro::def_solution_rt(r[0], theta[i], 0)); - } - } - - // int i1 = 0, i2 = 0; - for (int j = start_j; j < nr_int; j++) { // nodes of Disk K(eps,1-eps) - for (int i = 0; i < ntheta_int; i++) { - // alt: r0=0 - int row_index = j * ntheta_int + i; - - // % ==================== % - double kt = thetaplus[i]; - double thetamin1, ktmin1, hs, hsmin1; - if (i > 0) { - thetamin1 = theta[i - 1]; - ktmin1 = thetaplus[i - 1]; - } - else { - thetamin1 = theta[ntheta_int - 1]; // equal to 2*PI-ktmin1 - ktmin1 = thetaplus[ntheta_int - 1]; - } - // % -------------------- % - // r(j+1) is the current r - hs = hplus[j]; - if (j > 0) - hsmin1 = hplus[j - 1]; - else - hsmin1 = 2 * r[0]; // across the origin - // % ==================== % - - // right side (r=r(j+1) because r(1)=0 or start of j at 0 if r(1)>0) - // fac_hk=1; %% Factor now in diagonal matrix - double fac_hk = 0.25 * (kt + ktmin1) * (hs + hsmin1); - fVec.push_back(fac_hk * fabs(gyro::detDFinv(r[j], theta[i], 0)) * - gyro::eval_def_rhs(r[j], theta[i], 0)); // right side for r\in(eps,1-eps): r*f(r,phi) - - // 9-Point Stencil (attention order; first bottom, then right, then top right, top left, bottom left, middle) - // r-h- (h- = x_i-x_i-1) - - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && gyro::icntl[Param::DirBC_Interior]) { - // conditions aux limites Dirichlet - fVec[row_index] += - (0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0))) * - gyro::def_solution_rt(r[j - 1], theta[i], 0); - } - - // (r-h-,phi-k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && gyro::icntl[Param::DirBC_Interior]) { - // conditions aux limites Dirichlet - fVec[row_index] += - (gyro::art(r[j], thetamin1, 0) + gyro::art(r[j - 1], theta[i], 0)) * - gyro::def_solution_rt(r[j - 1], thetamin1, - 0); // factor is positive on left hand side, so it is negative here... - } - } - - // phi-k - - // (r+h+,phi-k) (en haut a droite) - double theta_eval_prelast = 0; - if (gyro::icntl[Param::mod_pk] > 0) { - if (i <= 0) { - theta_eval_prelast = theta[ntheta_int - 1]; - } - - // j=nr_int-1 means r+h is on the boundary --> to symmetrize, put it on the right hand side - if (j == nr_int - 1) { - if (i > 0) { // not the first node on the corresponding circle; we can take theta(i-1) - fVec[row_index] -= (gyro::art(r[j], thetamin1, 0) + gyro::art(r[j + 1], theta[i], 0)) * - gyro::def_solution_rt(r[j + 1], theta[i - 1], 0); - } - else { - fVec[row_index] -= (gyro::art(r[j], thetamin1, 0) + gyro::art(r[j + 1], theta[i], 0)) * - gyro::def_solution_rt(r[j + 1], theta_eval_prelast, 0); - } - } - } - - // r + h+ (h+ = x_i+1-x_i) - // j=nr_int-1 means r+h is on the boundary --> to symmetrize, put it on the right hand side - if (j == nr_int - 1) { - fVec[row_index] += - (0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0))) * - gyro::def_solution_rt(r[j + 1], theta[i], 0); - } - - ////// INSERT HERE IN THE UPPER LEFT CORNER - // (r+h+,phi+k) (en haut a gauche) - - double thetap1 = 0; - if (gyro::icntl[Param::mod_pk] > 0) { - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - - // j=nr_int-1 means r+h is on the boundary --> to symmetrize, put it on the right hand side - if (j == nr_int - 1) { - fVec[row_index] += (gyro::art(r[j + 1], theta[i], 0) + gyro::art(r[j], thetap1, 0)) * - gyro::def_solution_rt(r[j + 1], thetap1, 0); - } - } - - // phi+k - double r_tmp, theta_tmp; - - // (r-h-,phi+k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - if (j == 1) { // coords necessary for potential boundary conditions - if (i + 1 < ntheta_int) { - // gyro::trafo(r[j - 1], theta[i + 1], x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = theta[i + 1]; - } - else { - double pi2 = 2 * PI; - // gyro::trafo(r[j - 1], pi2, x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = pi2; - } - } - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - // j=1 means r-h is on the boundary, gyro::distBoundary([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && gyro::icntl[Param::DirBC_Interior]) { - // conditions aux limites Dirichlet - // factor is positive on left hand side, so it is negative here... - fVec[row_index] -= (gyro::art(r[j - 1], theta[i], 0) + gyro::art(r[j], thetap1, 0)) * - gyro::def_solution_rt(r_tmp, theta_tmp, 0); - } - } - - // (r,phi) - } - } - - for (int i = 0; i < ntheta_int; i++) { - // Dirichlet-RB outside % one value for each point outside (Dirichlet-RB), i.e. ntheta-many, - fVec.push_back(gyro::def_solution_rt(r[nr_int], theta[i], 0)); - } -} /* ----- end of level::build_rhs0 ----- */ - -/*! - * \brief Applies the operator A without construction (deprecated) - * - * Applies the matrix A of the system based on 9p FD. Relations with Dirichlet - * boundary condition nodes are shifted to the RHS to keep a symmetric operator. - * - * everything expressed in polar coordinates - * allows anisotropy in r - * - r: array of discretized r values - * - ntheta: number of discretization intervals in angle phi (also variable m) - * - * solves the transformed DGL: r*u_rr + u_r + 1/r*u_phiphi = rf fuer r>0, r<=1, - * fuer r=0, approximate: u_0 = 1/m sum_j u(h,jk)-(h/2)^2*f - * sorting of nodes ringwise. first node origin, last ntheta - * Node all the way out - * - */ -void level::apply_A0(std::vector u, std::vector& Au) -{ - // if boundary is only defined on radius, checks for wrongly detected boundary - // nodes due to rounding errors (double checking...) - double tol_bound_check = gyro::dcntl[Param::tol_bound_check]; - - // double x, y; - int index; - - // Take boundary condition into account - // In the operator - // gyro::trafo(r[0], theta[0], x, y, 0); - // alt: r0=0/neumBound - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { - // Dirichlet-RB (intérieur ; premier noeud dans la numérotation des disques) - for (int i = 0; i < ntheta_int; i++) { - Au[i] += u[i]; - } - index = ntheta_int; - } - else { - index = 0; - } - - int row, col; - double v; - - // gyro::trafo(r[0], theta[0], x, y, 0); - // alt: r0=0/neumBound - int start_j = 0; - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { - // alt: neumBC - start_j = 1; - } - // dirBound([r(1),0])>0 means that (r(1),0) is not on Dirichlet boundary - else if (r[0] > 0 && fabs(gyro::distBoundary(r[0], theta[0], 0)) > tol_bound_check) { - // alt: neumBC - start_j = 0; - } - // int i1 = 0, i2 = 0; - for (int j = start_j; j < nr_int; j++) { // nodes of Disk K(eps,1-eps) - for (int i = 0; i < ntheta_int; i++) { - // alt: r0=0 - int row_index = j * ntheta_int + i; - - // % ==================== % - double kt = thetaplus[i]; - double thetamin1, ktmin1, hs, hsmin1; - if (i > 0) { - thetamin1 = theta[i - 1]; - ktmin1 = thetaplus[i - 1]; - } - else { - thetamin1 = theta[ntheta_int - 1]; // equal to 2*PI-ktmin1 - ktmin1 = thetaplus[ntheta_int - 1]; - } - // % -------------------- % - // r(j+1) is the current r - hs = hplus[j]; - if (j > 0) - hsmin1 = hplus[j - 1]; - else - hsmin1 = 2 * r[0]; // across the origin - // % ==================== % - - // 9-Point Stencil (attention order; first bottom, then right, then top right, top left, bottom left, middle) - // r-h- (h- = x_i-x_i-1) - // if (j == 1) - // gyro::trafo(r[j - 1], theta[i], x, y, 0); - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r[j - 1], theta[i], 0)) < tol_bound_check) { - } - else { - // row_indices[index] = row_index; - row = row_index; - col = -42; - v = -42; - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - if (j > 1 || (j == 1 && r[0] > 0)) { - // to u at r-h geometrically recorded (i.e. -ntheta_int nodes at slice sorting) - col = row_index - ntheta_int; - } - else { // j=0 or j=1 - if (r[0] == 0) { // all refering to the single origin node! (j=0 not possible in this case) - // Reference to u at r-h=0 geometrically recorded (for all i the origin, because here r=h) - col = 1; - } - else if (j == 0) { // across the origin - if (i + 1 > ntheta_int / 2) { - col = row_index - ntheta_int / 2; // half a turn back - } - else { - col = row_index + ntheta_int / 2; // half a turn further - } - } - } - - if (j > 0) { - // alt: neumBC - // a l interieur sans contact aux conditions aux limites - v = -0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)); - } - else { - // j==0; across the origin - // just use r_{s-1}=0 - if (i + 1 > ntheta_int / 2) - // Use r(0):=r(j) to go to the other side of the origin - v = -0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)); - else // to make it symmetric, take values from second half circle - v = -0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)); - } - Au[row] += v * u[col]; - index++; - } - // (r-h-,phi-k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - // if (j == 1) // coords necessary for potential boundary conditions - // gyro::trafo(r[j - 1], thetamin1, x, y, 0); // r(j) is PREVIOUS r, actual is r(J+1) ! - // j=1 means r-h is on the boundary, dirBound([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) - // --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r[j - 1], thetamin1, 0)) < tol_bound_check) { - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - // but no dirichlet bc on innermost circle - if (j > 1 || (j == 1 && r[0] > 0)) { - row = row_index; - if (i > 0) // next node in theta direction but one circle before - col = row_index - ntheta_int - 1; - else // periodicity condition - col = row_index - 1; - } - - // if j > 0 - // alt: neumBound - if (j > 1 || (j == 1 && r[0] > 0)) { - // a l interieur sans contact aux conditions aux limites - // if (j > 1) // pas de reference vers l origine ici - v = -(gyro::art(r[j], thetamin1, 0) + gyro::art(r[j - 1], theta[i], 0)); - - Au[row] += v * u[col]; - index++; - } - } - } - - // phi-k - // row_indices[index] = row_index; - row = row_index; - if (i > 0) // previous node in phi direction - col = row_index - 1; - else // periodicity condition - col = row_index + ntheta_int - 1; - if (j > 0) - v = -0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) - - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - - else // j=0; take r(0)=0 // - v = -0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) - - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - - Au[row] += v * u[col]; - index++; - - // (r+h+,phi-k) (en haut a droite) - double theta_eval_prelast = 0; - double r_tmp, theta_tmp; - if (gyro::icntl[Param::mod_pk] > 0) { - if (i > 0) { // not the first node on the corresponding circle; we can take theta(i-1) - // gyro::trafo(r[j + 1], theta[i - 1], x, y, 0); - r_tmp = r[j + 1]; - theta_tmp = theta[i - 1]; - } - else { - theta_eval_prelast = theta[ntheta_int - 1]; - // gyro::trafo(r[j + 1], theta_eval_prelast, x, y, 0); - r_tmp = r[j + 1]; - theta_tmp = theta_eval_prelast; - } - - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r_tmp, theta_tmp, 0)) > tol_bound_check)) { - // row_indices[index] = row_index; - row = row_index; - if (i > 0) // previous node in phi direction but at r+h - col = row_index + ntheta_int - 1; - else // first node on corresponding circle; pay gyro::attention to periodicity condition! - col = row_index + 2 * ntheta_int - 1; - v = gyro::art(r[j], thetamin1, 0) + gyro::art(r[j + 1], theta[i], 0); - Au[row] += v * u[col]; - index++; - } - } - - // r + h+ (h+ = x_i+1-x_i) - // gyro::trafo(r[j + 1], theta[i], x, y, 0); - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) > tol_bound_check)) { - row = row_index; - col = row_index + ntheta_int; // zu u bei r+h - v = -0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) - - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)); - Au[row] += v * u[col]; - index++; - } - // j=nr_int-1 means r+h is on the boundary --> to symmetrize, put it on the right hand side - else if (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) < tol_bound_check) { - } - - // (r+h+,phi+k) (en haut a gauche) - double thetap1 = 0; - if (gyro::icntl[Param::mod_pk] > 0) { - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1 || - (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) > tol_bound_check)) { - row = row_index; - if (i + 1 < ntheta_int) // previous node in phi direction but at r+h - col = row_index + ntheta_int + 1; - else // first node on corresponding circle; pay gyro::attention to periodicity condition! - col = row_index + 1; - v = -gyro::art(r[j + 1], theta[i], 0) - gyro::art(r[j], thetap1, 0); - - Au[row] += v * u[col]; - index++; - } - // j=nr_int-1 means r+h is on the boundary --> to symmetrize, put it on the right hand side - else if (j == nr_int - 1 && fabs(gyro::distBoundary(r[j + 1], theta[i], 0)) < tol_bound_check) { - // gyro::trafo(r[j + 1], thetap1, x, y, 0); - } - } - - // phi+k - // row_indices[index] = row_index; - row = row_index; - if (i + 1 < ntheta_int) // next node in theta direction - col = row_index + 1; - else // periodicity condition - col = row_index - ntheta_int + 1; - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - if (j > 0) - v = -0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) - - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)); - else // j=0; - v = -0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) - - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)); - - Au[row] += v * u[col]; - index++; - - // (r-h-,phi+k) (en bas a gauche) - if (gyro::icntl[Param::mod_pk] > 0) { - double theta_tmp; - if (j == 1) { // coords necessary for potential boundary conditions - if (i + 1 < ntheta_int) { - // gyro::trafo(r[j - 1], theta[i + 1], x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = theta[i + 1]; - } - else { - double pi2 = 2 * PI; - // gyro::trafo(r[j - 1], pi2, x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = pi2; - } - } - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - // j=1 means r-h is on the boundary, gyro::distBoundary([r(j),0])==0 means that that Dirichlet BC are set at (r(j),0)) --> to symmetrize, put it on the right hand side - if (j == 1 && r[j - 1] > 0 && fabs(gyro::distBoundary(r_tmp, theta_tmp, 0)) < tol_bound_check) { - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) but no dirichlet bc on innermost circle - if (j > 1 || (j == 1 && r[0] > 0)) { - row = row_index; - if (i + 1 < ntheta_int) // next node in theta direction but one circle before - col = row_index - ntheta_int + 1; - else { // periodicity condition - col = row_index - 2 * ntheta_int + 1; - // theta_eval_prelast = theta[ntheta_int]; - } - } - - // alt: neumBC - if (j > 1 || (j == 1 && r[0] > 0)) { - // a l'interieur sans contact aux conditions aux limites - // if j > 1 // pas de reference vers l'origine ici - v = gyro::art(r[j - 1], theta[i], 0) + gyro::art(r[j], thetap1, 0); - Au[row] += v * u[col]; - index++; - } - } - } - - // (r,phi) - row = row_index; - col = row_index; - - if (i + 1 < ntheta_int) // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - else - thetap1 = 2 * PI; - if (j > 0) - // alt: neumBound - v = 0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - else { //across the origin; j=0 - v = 0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - if (i + 1 > ntheta_int / 2) - v += 0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)); - else // to make it symmetric, take values from second half circle - v += 0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)); - } - Au[row] += v * u[col]; - - double val = betaVec[row]; - Au[row] += val * u[col]; - index++; - } - } - - // Dirichlet-RB (outside; last node in slice numbering) - double t_tmp = 0; - // gyro::trafo(r[nr_int], t_tmp, x, y, 0); - if (fabs(gyro::distBoundary(r[nr_int], t_tmp, 0)) < - tol_bound_check) { // dirBound([r(n+1),0])==0 means that (r(n+1),0) is on Dirichlet boundary - // alt: r0=0 ? - for (int i = 0; i < ntheta_int; i++) { - Au[row + i + 1] += u[row + i + 1]; - } - } -} /* ----- end of level::apply_A0 ----- */ diff --git a/src/build_rhs_apply_op.cpp b/src/build_rhs_apply_op.cpp deleted file mode 100644 index 0dcb2bcb..00000000 --- a/src/build_rhs_apply_op.cpp +++ /dev/null @@ -1,2207 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file build_rhs_apply_op.cpp - * \brief Implementation of the 9p FD operators A and RHS - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -/*! - * \brief Build the operator A - * - * Builds the matrix A of the system based on 9p FD. Relations with Dirichlet - * boundary condition nodes are shifted to the RHS to keep a symmetric operator. - * - * everything expressed in polar coordinates - * allows anisotropy in r - * - r: array of discretized r values - * - ntheta: number of discretization intervals in angle phi (also variable m) - * - * solves the transformed DGL: r*u_rr + u_r + 1/r*u_phiphi = rf fuer r>0, r<=1, - * fuer r=0, approximate: u_0 = 1/m sum_j u(h,jk)-(h/2)^2*f - * sorting of nodes ringwise. first node origin, last ntheta - * Node all the way out - */ -void level::build_A() -{ - int start_j; - int* dep = new int[nr]; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB first line !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - start_j = 1; - } - else { // (r[0],0) is not on Dirichlet boundary - start_j = 0; - } - -#pragma omp parallel shared(dep) - { -#pragma omp single - { - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary -#pragma omp task shared(dep, start_j) depend(out : dep[0]) - { - for (int i = 0; i < ntheta_int; i++) { - row_indices[i] = i; - col_indices[i] = i; - - vals[i] += 1.0; - } - } //end of task and parallel - } - -#pragma omp task shared(dep, start_j) depend(out : dep[nr_int]) - { - // int ptr, row; // To be removed ? - // Take boundary condition into account: Dirichlet-RB - for (int i = 0; i < ntheta_int; i++) { - // row = m - ntheta_int + i; - // ptr = nz - ntheta_int + i; - row_indices[nz - ntheta_int + i] = m - ntheta_int + i; - col_indices[nz - ntheta_int + i] = m - ntheta_int + i; - - vals[nz - ntheta_int + i] += 1.0; - } - } //end of task and parallel - -#pragma omp task shared(dep, start_j) depend(out : dep[start_j]) - { - int i, j, ptr, row, col; - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! First lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = start_j; - ptr_vect = get_ptr(j); - ptr_vect_next = get_ptr(j + 1); - stencil_cur = get_stencil(j); - stencil_next = get_stencil(j + 1); - stencil = stencil_cur; - - for (int i = 0; i < ntheta_int; i++) { - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - val = betaVec[row]; - - vals[ptr + stencil[Param::middle]] += val; - } - - hs = hplus[j]; - arr_vect = gyro::arr(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - // Across: bottom update - if (!gyro::icntl[Param::DirBC_Interior]) { - hsmin1 = 2 * r[0]; - // Accross the origin theta and arr - arr_vect2 = gyro::arr(r[j], theta_PI, sin_theta_PI, cos_theta_PI, ntheta_int, 0); - - for (i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - if (i + 1 <= ntheta_int / 2) // first half of circle: half a turn further - col = row + ntheta_int / 2; - else // second half of circle: half a turn back - col = row - ntheta_int / 2; - row_indices[ptr + stencil[Param::bottom]] = row; - col_indices[ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - coeff2 = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - vals[ptr + stencil[Param::bottom]] += -coeff - coeff2; - - vals[ptr + stencil[Param::middle]] += coeff; - } - } - else { - hsmin1 = hplus[j - 1]; - // DB contribution arr (r(0)) - arr_vect2 = gyro::arr(r[j - 1], theta, sin_theta, cos_theta, ntheta_int, 0); - - for (i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect[i + 1]; - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - row = j * ntheta_int + i; - - vals[ptr + stencil[Param::middle]] += coeff; - } - } - - // Across and DB_int updates (~~~ Interior - (j-1, i)) - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - for (i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) (=== Interior - bottom) - ptr = ptr_vect[i + 1]; - stencil = stencil_cur; - row = j * ntheta_int + i; - row_indices[ptr + stencil[Param::middle]] = row; - col_indices[ptr + stencil[Param::middle]] = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - - vals[ptr + stencil[Param::top]] += -coeff / hs; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - - vals[ptr + stencil[Param::left]] += -coeff2 / ktmin1; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - - vals[ptr + stencil[Param::right]] += -coeff2 / kt; - - vals[ptr + stencil[Param::middle]] += coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Update (j, i+1) (=== Interior - bottom_left) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::left]] = row; - col_indices[ptr + stencil[Param::left]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - - vals[ptr + stencil[Param::left]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) (=== Interior - bottom_right) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::right]] = row; - col_indices[ptr + stencil[Param::right]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - - vals[ptr + stencil[Param::right]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j+1, i) (=== Interior) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom]] = row; - col_indices[ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - vals[ptr + stencil[Param::bottom]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) (=== Interior - bottom_left) - ptr = ptr_vect[i + 2]; - stencil = stencil_cur; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - - // Update (j, i-1) (=== Interior - bottom_right) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j+1, i) (=== Interior) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - } - } // end of task - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (1) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 3; j < nr_int - 1; j += 3) { -#pragma omp task shared(dep, start_j) firstprivate(j) depend(out : dep[j]) - { - int ptr, row, col; - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - ptr_vect_prev = get_ptr(j - 1); - ptr_vect = get_ptr(j); - ptr_vect_next = get_ptr(j + 1); - stencil_prev = get_stencil(j - 1); - stencil_cur = get_stencil(j); - stencil_next = get_stencil(j + 1); - - stencil = stencil_cur; - for (int i = 0; i < ntheta_int; i++) { - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - val = betaVec[row]; - - vals[ptr + stencil[Param::middle]] += val; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::top]] = row; - col_indices[ptr + stencil[Param::top]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - vals[ptr + stencil[Param::top]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i) - ptr = ptr_vect[i + 1]; - stencil = stencil_cur; - row = j * ntheta_int + i; - row_indices[ptr + stencil[Param::middle]] = row; - col_indices[ptr + stencil[Param::middle]] = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - - vals[ptr + stencil[Param::top]] += -coeff / hs; - col = (j - 1) * ntheta_int + i; - - vals[ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - - vals[ptr + stencil[Param::left]] += -coeff2 / ktmin1; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - - vals[ptr + stencil[Param::right]] += -coeff2 / kt; - - vals[ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::left]] = row; - col_indices[ptr + stencil[Param::left]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - - vals[ptr + stencil[Param::left]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::right]] = row; - col_indices[ptr + stencil[Param::right]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - - vals[ptr + stencil[Param::right]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom]] = row; - col_indices[ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - vals[ptr + stencil[Param::bottom]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - stencil = stencil_cur; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - } - } // end of task - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (2) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 1; j < nr_int - 1; j += 3) { -#pragma omp task shared(dep, start_j) firstprivate(j) depend(in \ - : dep[j - 1]) depend(in \ - : dep[j + 2]) depend(out \ - : dep[j]) - { - int ptr, row, col; - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - ptr_vect_prev = get_ptr(j - 1); - ptr_vect = get_ptr(j); - ptr_vect_next = get_ptr(j + 1); - stencil_prev = get_stencil(j - 1); - stencil_cur = get_stencil(j); - stencil_next = get_stencil(j + 1); - - stencil = stencil_cur; - for (int i = 0; i < ntheta_int; i++) { - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - val = betaVec[row]; - - vals[ptr + stencil[Param::middle]] += val; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::top]] = row; - col_indices[ptr + stencil[Param::top]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - vals[ptr + stencil[Param::top]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i) - ptr = ptr_vect[i + 1]; - stencil = stencil_cur; - row = j * ntheta_int + i; - row_indices[ptr + stencil[Param::middle]] = row; - col_indices[ptr + stencil[Param::middle]] = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - - vals[ptr + stencil[Param::top]] += -coeff / hs; - col = (j - 1) * ntheta_int + i; - - vals[ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - - vals[ptr + stencil[Param::left]] += -coeff2 / ktmin1; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - - vals[ptr + stencil[Param::right]] += -coeff2 / kt; - - vals[ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::left]] = row; - col_indices[ptr + stencil[Param::left]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - - vals[ptr + stencil[Param::left]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::right]] = row; - col_indices[ptr + stencil[Param::right]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - - vals[ptr + stencil[Param::right]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom]] = row; - col_indices[ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - vals[ptr + stencil[Param::bottom]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - stencil = stencil_cur; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - } - } // end of task - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (3) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 2; j < nr_int - 1; j += 3) { -#pragma omp task shared(dep, start_j) firstprivate(j) depend(in \ - : dep[j - 1]) depend(in \ - : dep[j + 2]) depend(out \ - : dep[j]) - { - int ptr, row, col; - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - ptr_vect_prev = get_ptr(j - 1); - ptr_vect = get_ptr(j); - ptr_vect_next = get_ptr(j + 1); - stencil_prev = get_stencil(j - 1); - stencil_cur = get_stencil(j); - stencil_next = get_stencil(j + 1); - - stencil = stencil_cur; - for (int i = 0; i < ntheta_int; i++) { - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - val = betaVec[row]; - - vals[ptr + stencil[Param::middle]] += val; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::top]] = row; - col_indices[ptr + stencil[Param::top]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - vals[ptr + stencil[Param::top]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i) - ptr = ptr_vect[i + 1]; - stencil = stencil_cur; - row = j * ntheta_int + i; - row_indices[ptr + stencil[Param::middle]] = row; - col_indices[ptr + stencil[Param::middle]] = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - - vals[ptr + stencil[Param::top]] += -coeff / hs; - col = (j - 1) * ntheta_int + i; - - vals[ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - - vals[ptr + stencil[Param::left]] += -coeff2 / ktmin1; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - - vals[ptr + stencil[Param::right]] += -coeff2 / kt; - - vals[ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::left]] = row; - col_indices[ptr + stencil[Param::left]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - - vals[ptr + stencil[Param::left]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::right]] = row; - col_indices[ptr + stencil[Param::right]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - - vals[ptr + stencil[Param::right]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom]] = row; - col_indices[ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - vals[ptr + stencil[Param::bottom]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j, i+1) - ptr = ptr_vect[i + 2]; - stencil = stencil_cur; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - - // Update (j, i-1) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - col = (j + 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j+1, i) (Not in DB_ext) - ptr = ptr_vect_next[i + 1]; - stencil = stencil_next; - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - } - } // end of task - } - -#pragma omp task shared(dep, start_j) depend(in \ - : dep[nr_int - 2]) depend(in \ - : dep[nr_int - 3]) depend(out \ - : dep[nr_int - 1]) - { - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - int j, ptr, row, col; - double coeff, coeff2, val, coeff3, kt, ktmin1, hs, hsmin1; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - j = nr_int - 1; - ptr_vect_prev = get_ptr(j - 1); - ptr_vect = get_ptr(j); - stencil_prev = get_stencil(j - 1); - stencil_cur = get_stencil(j); - - stencil = stencil_cur; - for (int i = 0; i < ntheta_int; i++) { - ptr = ptr_vect[i + 1]; - row = j * ntheta_int + i; - val = betaVec[row]; - - vals[ptr + stencil[Param::middle]] += val; - } - - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - arr_vect2 = gyro::arr(r[j + 1], theta, sin_theta, cos_theta, ntheta_int, 0); - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (=== Interior) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::top]] = row; - col_indices[ptr + stencil[Param::top]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - vals[ptr + stencil[Param::top]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i) (=== Interior - top) - ptr = ptr_vect[i + 1]; - stencil = stencil_cur; - row = j * ntheta_int + i; - col = row; - row_indices[ptr + stencil[Param::middle]] = row; - col_indices[ptr + stencil[Param::middle]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j - 1) * ntheta_int + i; - - vals[ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - // Contribution to middle (top) from DB - coeff2 = 0.5 * (kt + ktmin1) * arr_vect2[i] / hs; - - coeff3 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - - vals[ptr + stencil[Param::left]] += -coeff3 / ktmin1; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - - vals[ptr + stencil[Param::right]] += -coeff3 / kt; - - vals[ptr + stencil[Param::middle]] += - coeff / hsmin1 + coeff / hs + coeff2 + coeff3 / ktmin1 + coeff3 / kt; - - // Update (j, i+1) (=== Interior - top_left) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::left]] = row; - col_indices[ptr + stencil[Param::left]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - - vals[ptr + stencil[Param::left]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) (=== Interior - top_right) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - row_indices[ptr + stencil[Param::right]] = row; - col_indices[ptr + stencil[Param::right]] = col; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - - vals[ptr + stencil[Param::right]] += -coeff; - - vals[ptr + stencil[Param::middle]] += coeff; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (=== Interior) - ptr = ptr_vect_prev[i + 1]; - stencil = stencil_prev; - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - row_indices[ptr + stencil[Param::top_left]] = row; - col_indices[ptr + stencil[Param::top_left]] = col; - - vals[ptr + stencil[Param::top_left]] += art_vect[i]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - row_indices[ptr + stencil[Param::top_right]] = row; - col_indices[ptr + stencil[Param::top_right]] = col; - - vals[ptr + stencil[Param::top_right]] += -art_vect[i]; - - // Update (j, i+1) (=== Interior - top_left) - ptr = ptr_vect[i + 2]; - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_left]] = row; - col_indices[ptr + stencil[Param::bottom_left]] = col; - - vals[ptr + stencil[Param::bottom_left]] += -art_vect[i]; - - // Update (j, i-1) (=== Interior - top_right) - ptr = ptr_vect[i]; - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - row_indices[ptr + stencil[Param::bottom_right]] = row; - col_indices[ptr + stencil[Param::bottom_right]] = col; - - vals[ptr + stencil[Param::bottom_right]] += art_vect[i]; - } - } //end of task - } //end of single - } //end of parallel - - delete[] dep; -} /* ----- end of level::build_A ----- */ - -/*! - * \brief Build the RHS - * - * Builds the RHS of the system based on 9p FD. Relations with Dirichlet boundary - * condition nodes are shifted to the RHS to keep a symmetric operator. - * - */ -void level::build_rhs() -{ - // double tol_bound_check = 1e-8; - // double Rmax = gyro::dcntl[Param::R]; - int start_j; - int* dep = new int[nr]; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB first line !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - start_j = 1; - } - else // (r[0],0) is not on Dirichlet boundary - start_j = 0; - -#pragma omp parallel shared(dep) - { -#pragma omp single - { - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary -#pragma omp task shared(dep, start_j) depend(out : dep[0]) - { - std::vector sol = gyro::def_solution_rt(r[0], theta, sin_theta, cos_theta, ntheta_int, 0); - for (int i = 0; i < ntheta_int; i++) { - - fVec[i] = sol[i]; - } - } //end of task - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Fill base RHS !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // across the origin (treat separately because of hsmin1) - // std::vector coeff_b = gyro::coeff_beta(r, 0); - for (int j = start_j; j < nr_int; j++) { -#pragma omp task shared(dep, start_j) firstprivate(j) depend(out : dep[j]) - { - int i, row; - double kt, ktmin1, hs, hsmin1; - if (j == 0) - hsmin1 = 2 * r[0]; - else - hsmin1 = hplus[j - 1]; - std::vector det = gyro::detDFinv(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - std::vector rhs = gyro::eval_def_rhs(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - // Define the index, position and interval size of current and previous node - // - in r - hs = hplus[j]; - for (i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - double fac_hk = 0.25 * (kt + ktmin1) * (hs + hsmin1); - - fVec[row] = fac_hk * fabs(det[i]) * rhs[i]; - } - hsmin1 = hs; - } - } //end of task - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB_int !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ -#pragma omp task shared(dep, start_j) depend(in : dep[1]) - { - // int hs, ; - int j = 1; - if (gyro::icntl[Param::DirBC_Interior]) { - int i, row; - double kt, ktmin1; - std::vector sol = - gyro::def_solution_rt(r[j - 1], theta, sin_theta, cos_theta, ntheta_int, 0); - if (gyro::icntl[Param::mod_pk] > 0) { - std::vector art_vect_prev = - gyro::art(r[j - 1], theta_per, sin_theta_per, cos_theta_per, ntheta_int + 1, 0); - std::vector art_vect = - gyro::art(r[j], theta_per, sin_theta_per, cos_theta_per, ntheta_int + 1, 0); - for (i = 1; i < ntheta_int - 1; i++) { - row = j * ntheta_int + i; - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // bottom_left - fVec[row] += (art_vect[i] + art_vect_prev[i + 1]) * sol[i - 1]; - // bottom_right - fVec[row] -= (art_vect_prev[i + 1] + art_vect[i + 2]) * sol[i + 1]; - } - // i=0 - i = 0; - row = j * ntheta_int + i; - - fVec[row] += (art_vect[ntheta_int] + art_vect_prev[1]) * sol[ntheta_int - 1]; - - fVec[row] -= (art_vect_prev[1] + art_vect[2]) * sol[1]; - - // i=ntheta_int-1 - i = ntheta_int - 1; - row = j * ntheta_int + i; - - fVec[row] += (art_vect[ntheta_int - 1] + art_vect_prev[ntheta_int]) * sol[ntheta_int - 2]; - - fVec[row] -= (art_vect_prev[ntheta_int] + art_vect[1]) * sol[0]; - } - std::vector arr_vect_prev = gyro::arr(r[j - 1], theta, sin_theta, cos_theta, ntheta_int, 0); - std::vector arr_vect = gyro::arr(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - for (i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - // - in r - double hsmin1 = hplus[j - 1]; - - // bottom - - fVec[row] += 0.5 * (kt + ktmin1) * (arr_vect_prev[i] + arr_vect[i]) * sol[i] / hsmin1; - } - } - } //end of task - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB_ext !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ -#pragma omp task shared(dep, start_j) depend(in : dep[nr_int - 1]) - { - int i, j, row; - double kt, ktmin1, hs; - // double hsmin1; - j = nr_int - 1; - std::vector sol = gyro::def_solution_rt(r[j + 1], theta, sin_theta, cos_theta, ntheta_int, 0); - if (gyro::icntl[Param::mod_pk] > 0) { - std::vector art_vect = - gyro::art(r[j], theta_per, sin_theta_per, cos_theta_per, ntheta_int + 1, 0); - std::vector art_vect_next = - gyro::art(r[j + 1], theta_per, sin_theta_per, cos_theta_per, ntheta_int + 1, 0); - for (i = 1; i < ntheta_int - 1; i++) { - row = j * ntheta_int + i; - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - // - in r - hs = hplus[j]; - - // top_left - - fVec[row] -= (art_vect[i] + art_vect_next[i + 1]) * sol[i - 1]; - // top_right - - fVec[row] += (art_vect_next[i + 1] + art_vect[i + 2]) * sol[i + 1]; - } - // i=0 - i = 0; - row = j * ntheta_int + i; - - fVec[row] -= (art_vect[ntheta_int] + art_vect_next[1]) * sol[ntheta_int - 1]; - - fVec[row] += (art_vect_next[1] + art_vect[2]) * sol[1]; - - // i=ntheta_int-1 - i = ntheta_int - 1; - row = j * ntheta_int + i; - - fVec[row] -= (art_vect[ntheta_int - 1] + art_vect_next[ntheta_int]) * sol[ntheta_int - 2]; - - fVec[row] += (art_vect_next[ntheta_int] + art_vect[1]) * sol[0]; - } - std::vector arr_vect = gyro::arr(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - std::vector arr_vect_next = gyro::arr(r[j + 1], theta, sin_theta, cos_theta, ntheta_int, 0); - for (i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - // - in r - hs = hplus[j]; - - // top - - fVec[row] += (0.5 * (kt + ktmin1) * (arr_vect[i] + arr_vect_next[i])) * sol[i] / hs; - } - } //end of task - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB last line !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ -#pragma omp task shared(dep, start_j) depend(out : dep[nr_int]) - { - std::vector sol = gyro::def_solution_rt(r[nr_int], theta, sin_theta, cos_theta, ntheta_int, 0); - for (int i = 0; i < ntheta_int; i++) { - - fVec[m - ntheta_int + i] = sol[i]; - } - } - } //end of single - } //end of parallel - - delete[] dep; -} /* ----- end of level::build_rhs ----- */ - -/*! - * \brief Build the RHS - * - * Builds the RHS of the system based on 9p FD. Relations with Dirichlet boundary - * condition nodes are shifted to the RHS to keep a symmetric operator. - * - */ -void level::build_betaVec() -{ - // #pragma omp parallel shared(dep) - { - // #pragma omp single - { - // across the origin (treat separately because of hsmin1) - for (int j = 0; j < nr_int; j++) { - // #pragma omp task shared(dep, start_j) firstprivate(j) depend(out : dep[j]) - { - int i, row; - double kt, ktmin1, hs, hsmin1; - if (j == 0) - hsmin1 = 2 * r[0]; - else - hsmin1 = hplus[j - 1]; - std::vector det = gyro::detDFinv(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - // Define the index, position and interval size of current and previous node - // - in r - hs = hplus[j]; - for (i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - double coeff_b = gyro::coeff_beta(r[j], 0); - - double fac_hk = 0.25 * (kt + ktmin1) * (hs + hsmin1); - betaVec[row] = fac_hk * coeff_b * fabs(det[i]); - } - hsmin1 = hs; - } - } //end of task - } //end of single - } //end of parallel -} /* ----- end of level::build_betaVec ----- */ - -/*! - * \brief Applies the operator A without construction - * - * Applies the matrix A of the system based on 9p FD. Relations with Dirichlet - * boundary condition nodes are shifted to the RHS to keep a symmetric operator. - * - * everything expressed in polar coordinates - * allows anisotropy in r - * - r: array of discretized r values - * - ntheta: number of discretization intervals in angle phi (also variable m) - * - * solves the transformed DGL: r*u_rr + u_r + 1/r*u_phiphi = rf fuer r>0, r<=1, - * fuer r=0, approximate: u_0 = 1/m sum_j u(h,jk)-(h/2)^2*f - * sorting of nodes ringwise. first node origin, last ntheta - * Node all the way out - * - * \param u: vector on which to apply A - * \param Au: result vector = A*u - * - */ -void level::apply_A(std::vector u, std::vector& Au) -{ - int start_j; - int* dep = new int[nr]; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! DB first line !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - start_j = 1; - } - else { // (r[0],0) is not on Dirichlet boundary - start_j = 0; - } - -#pragma omp parallel shared(dep, Au) - { -#pragma omp single - { - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary -#pragma omp task depend(out : dep[0]) - { - for (int i = 0; i < ntheta_int; i++) { - - Au[i] += u[i]; - } - } //end of task - } - -#pragma omp task depend(out : dep[nr_int]) - { - // Take boundary condition into account: Dirichlet-RB - for (int i = 0; i < ntheta_int; i++) { - int row = m - ntheta_int + i; - - Au[row] += u[row]; - } - } //end of task and parallel - -#pragma omp task depend(out : dep[start_j]) - { - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - int row, col; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! First lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - int j = start_j; - - for (int i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - val = betaVec[row]; - - Au[row] += val * u[row]; - } - - hs = hplus[j]; - arr_vect = gyro::arr(r[j], theta, sin_theta, cos_theta, ntheta_int, 0); - // Across: bottom update - if (!gyro::icntl[Param::DirBC_Interior]) { - hsmin1 = 2 * r[0]; - // Accross the origin theta and arr - arr_vect2 = gyro::arr(r[j], theta_PI, sin_theta_PI, cos_theta_PI, ntheta_int, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - row = j * ntheta_int + i; - if (i + 1 <= ntheta_int / 2) // first half of circle: half a turn further - col = row + ntheta_int / 2; - else // second half of circle: half a turn back - col = row - ntheta_int / 2; - - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - coeff2 = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - // bottom - val = -coeff - coeff2; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - } - else { - hsmin1 = hplus[j - 1]; - // DB contribution arr (r(0)) - arr_vect2 = gyro::arr(r[j - 1], theta, sin_theta, cos_theta, ntheta_int, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - row = j * ntheta_int + i; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - } - - // Across and DB_int updates (~~~ Interior - (j-1, i)) - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) (=== Interior - bottom) - row = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - // top - val = -coeff / hs; - - Au[row] += val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // left - val = -coeff2 / ktmin1; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // right - val = -coeff2 / kt; - - Au[row] += val * u[col]; - - // middle - val = coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - Au[row] += val * u[row]; - - // Update (j, i+1) (=== Interior - bottom_left) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - // left - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i-1) (=== Interior - bottom_right) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - // right - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j+1, i) (=== Interior) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - // bottom - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - - if (gyro::icntl[Param::mod_pk] > 0) { - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) (=== Interior - bottom_left) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j + 1) * ntheta_int + i; - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i-1) (=== Interior - bottom_right) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j + 1) * ntheta_int + i; - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j+1, i) (=== Interior) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - } - } - } // end of task -------------------------------------------------------------------------------------------------- - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (1) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 3; j < nr_int - 1; j += 3) { -#pragma omp task firstprivate(j) depend(out : dep[j]) - { - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - int row, col; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - for (int i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - val = betaVec[row]; - - Au[row] += val * u[row]; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - // top - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i) - row = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - // top - val = -coeff / hs; - - Au[row] += val * u[col]; - col = (j - 1) * ntheta_int + i; - // bottom - val = -coeff / hsmin1; - - Au[row] += val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // left - val = -coeff2 / ktmin1; - Au[row] += val * u[col]; - - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // right - val = -coeff2 / kt; - - Au[row] += val * u[col]; - - // middle - val = coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - Au[row] += val * u[row]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - // left - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - // right - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - // bottom - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - if (gyro::icntl[Param::mod_pk] > 0) { - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - } - } - } // end of task ----------------------------------------------------------------------------------------------- - } //end of for - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (2) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 1; j < nr_int - 1; j += 3) { -#pragma omp task firstprivate(j) depend(in : dep[j - 1]) depend(in : dep[j + 2]) depend(out : dep[j]) - { - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - int row, col; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - for (int i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - val = betaVec[row]; - - Au[row] += val * u[row]; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - // top - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i) - row = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - // top - val = -coeff / hs; - - Au[row] += val * u[col]; - col = (j - 1) * ntheta_int + i; - // bottom - val = -coeff / hsmin1; - - Au[row] += val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // left - val = -coeff2 / ktmin1; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // right - val = -coeff2 / kt; - - Au[row] += val * u[col]; - - // middle - val = coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - Au[row] += val * u[row]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - // left - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - // right - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - // bottom - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - if (gyro::icntl[Param::mod_pk] > 0) { - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - } - } - } // end of task ------------------------------------------------------------------------------------------- - } //end of for - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Interior nodes (2) !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = start_j + 2; j < nr_int - 1; j += 3) { -#pragma omp task depend(in : dep[j - 1]) depend(in : dep[j + 2]) depend(out : dep[j]) - { - double coeff, coeff2, val, kt, ktmin1, hs, hsmin1; - int row, col; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - for (int i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - val = betaVec[row]; - - Au[row] += val * u[row]; - } - - // - in r - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - // top - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i) - row = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - // top - val = -coeff / hs; - - Au[row] += val * u[col]; - col = (j - 1) * ntheta_int + i; - // bottom - val = -coeff / hsmin1; - - Au[row] += val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // left - val = -coeff2 / ktmin1; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // right - val = -coeff2 / kt; - - Au[row] += val * u[col]; - - // middle - val = coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - Au[row] += val * u[row]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - // left - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - // right - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - // bottom - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - if (gyro::icntl[Param::mod_pk] > 0) { - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (Not in DB_int) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i+1) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i-1) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - col = (j + 1) * ntheta_int + i; - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j+1, i) (Not in DB_ext) - row = (j + 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - } - } - } // end of task ------------------------------------------------------------------------------------------- - } //end of for - -#pragma omp task depend(in : dep[nr_int - 2]) depend(in : dep[nr_int - 3]) depend(out : dep[nr_int - 1]) - { - double coeff, coeff2, coeff3, val, kt, ktmin1, hs, hsmin1; - int row, col; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines (1) !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - int j = nr_int - 1; - for (int i = 0; i < ntheta_int; i++) { - row = j * ntheta_int + i; - val = betaVec[row]; - - Au[row] += val * u[row]; - } - - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - arr_vect2 = gyro::arr(r[j + 1], theta, sin_theta, cos_theta, ntheta_int, 0); - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (=== Interior) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - // top - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i) (=== Interior - top) - row = j * ntheta_int + i; - col = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j - 1) * ntheta_int + i; - // bottom - val = -coeff / hsmin1; - - Au[row] += val * u[col]; - - // Contribution to middle (top) from DB - coeff2 = 0.5 * (kt + ktmin1) * arr_vect2[i] / hs; - - coeff3 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // left - val = -coeff3 / ktmin1; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // right - val = -coeff3 / kt; - - Au[row] += val * u[col]; - - // middle - val = coeff / hsmin1 + coeff / hs + coeff2 + coeff3 / ktmin1 + coeff3 / kt; - - Au[row] += val * u[row]; - - // Update (j, i+1) (=== Interior - top_left) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - // left - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - - // Update (j, i-1) (=== Interior - top_right) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = j * ntheta_int + i; - - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - // right - val = -coeff; - - Au[row] += val * u[col]; - // middle - val = coeff; - - Au[row] += val * u[row]; - } - if (gyro::icntl[Param::mod_pk] > 0) { - for (int i = 0; i < ntheta_int; i++) { - // Define the index, position and interval size of current and previous node - // - in theta - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) (=== Interior) - row = (j - 1) * ntheta_int + i; - col = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - // top_left - val = art_vect[i]; - - Au[row] += val * u[col]; - col = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - // top_right - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i+1) (=== Interior - top_left) - row = j * ntheta_int + ((i + 1 > ntheta_int - 1) ? 0 : i + 1); - col = (j - 1) * ntheta_int + i; - // bottom_left - val = -art_vect[i]; - - Au[row] += val * u[col]; - - // Update (j, i-1) (=== Interior - top_right) - row = j * ntheta_int + ((i - 1 < 0) ? ntheta_int - 1 : i - 1); - col = (j - 1) * ntheta_int + i; - // bottom_right - val = art_vect[i]; - - Au[row] += val * u[col]; - } - } - } //end of task - } //end of single - } //end of parallel - - delete[] dep; -} /* ----- end of level::apply_A ----- */ diff --git a/src/create_grid_polar.cpp b/src/create_grid_polar.cpp deleted file mode 100644 index 7c7cb5ec..00000000 --- a/src/create_grid_polar.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file create_grid_polar.cpp - * \brief Implementation of the creation of the polar grid (r and theta) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gmgpolar.h" -#include "level.h" - -/*! - * \brief Create the polar grids - * - * Create the polar finest grids - * - */ -void gmgpolar::create_grid_polar() -{ - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Creating polar grid...\n"; - - level* new_level = new level(0); - v_level.push_back(new_level); - if (gyro::f_grid_r.empty() || gyro::icntl[Param::write_radii_angles] == 1) { - v_level[0]->build_r(); - } - else { - v_level[0]->read_grid_r(); - } - if (gyro::f_grid_theta.empty() || gyro::icntl[Param::write_radii_angles] == 1) { - v_level[0]->build_theta(); - } - else { - v_level[0]->read_grid_theta(); - } - - if (v_level[0]->ntheta < 2) - throw std::runtime_error("Choose size theta > 3!"); - - gyro::dcntl[Param::R0] = v_level[0]->r[0]; - gyro::dcntl[Param::R] = v_level[0]->r[v_level[0]->nr - 1]; - gyro::dcntl[Param::THETA0] = v_level[0]->theta[0]; - gyro::dcntl[Param::THETA] = v_level[0]->theta[v_level[0]->ntheta - 1]; - - //split grid intervals in r and theta direction recursively in the middle to get a finer grid - if (gyro::icntl[Param::divideBy2] != 0) { - create_grid_polar_divide(); - } - - if (gyro::icntl[Param::verbose] > 1) { - std::cout << "System of size (nr x ntheta) = (" << v_level[0]->nr << " x " << v_level[0]->ntheta << ")\n"; - std::cout << "on the coordinates (r x theta): (" << gyro::dcntl[Param::R0] << ", " << gyro::dcntl[Param::R] - << ") x (" << gyro::dcntl[Param::THETA0] << ", " << gyro::dcntl[Param::THETA] << ")\n"; - } - if (gyro::icntl[Param::verbose] > 5) { - v_level[0]->display_r(); - v_level[0]->display_theta(); - std::cout << "\n"; - } - - if (!gyro::f_grid_r.empty() && gyro::icntl[Param::write_radii_angles] == 1) { - v_level[0]->write_grid_r(); - } - if (!gyro::f_grid_theta.empty() && gyro::icntl[Param::write_radii_angles] == 1) { - v_level[0]->write_grid_theta(); - } -} /* ----- end of gmgpolar::create_grid_polar ----- */ - -/*! - * \brief Build the array r - * - * Build the array r, containing the coordinates in the direction r, - * following an iso- or aniso-tropic division. - */ -void level::build_r() -{ - int nr_exp = gyro::icntl[Param::nr_exp]; - int aniso = gyro::icntl[Param::fac_ani]; - double R = gyro::dcntl[Param::R]; - double R0 = gyro::dcntl[Param::R0]; - - if (l > 0) - throw std::runtime_error("Function build_r should only be called on the finest grid"); - std::vector r_tmp; - if (!aniso) { - nr = pow(2, nr_exp - 1); - double fac = (R - R0) / nr; - r_tmp = std::vector(nr + 1); - for (int i = 0; i < nr; i++) { - r_tmp[i] = R0 + i * fac; - } - r_tmp[nr] = R; - nr++; - } - else { - // 1) uniform division with nr=2^dummy_lognr - 2^aniso - // 2) remaining nodes are added by refining the part centered around 2/3 of r - - std::set>::iterator itr, itr_p1; - // very ugly anisotropy hack.... dividing recursively smaller and smaller number of cells - - /* uniform division of r in 2^nr_exp - 2^aniso */ - int dummy_lognr = nr_exp; - int n_elems_equi = pow(2, dummy_lognr) - pow(2, aniso); - if (aniso < 0 || n_elems_equi <= 0) { - throw std::runtime_error("Please choose anisotropy factor a such that 2^fac_ani < 2^nr_exp.\n"); - } - - if ((aniso % 2) == 1) // odd number of elements on an open circular disk is desired because of coarsening - n_elems_equi++; - double fac = (R - R0) / n_elems_equi; - nr = n_elems_equi + 1; - std::vector r_tmp2 = std::vector(nr); - for (int i = 0; i < nr - 1; i++) - r_tmp2[i] = R0 + i * fac; - r_tmp2[nr - 1] = R; - - /* refine around 2/3 of r */ - int n_elems_refined = pow(2, aniso); - - // edge - int se; - - // allow refining of the grid at r_jump, the center point of the - // drop of the diffusion coefficient alpha. - double r_jump; - if (gyro::icntl[Param::alpha_coeff] == SONNENDRUCKER) { - // The center of the coefficient jump lies at 0.6888697651782026 - // for backward stability with previous runs and the Matlab code, - // we use 0.66 though. - r_jump = 0.66; - } - else if (gyro::icntl[Param::alpha_coeff] == ZONI) { - r_jump = 0.4837; - } - else if (gyro::icntl[Param::alpha_coeff] == ZONI_SHIFTED) { - // Choose center point of descent. - // a) - ln(0.5 * (alpha(0) - alpha(Rmax))): - // - ln(0.5 * (np.exp(-np.tanh(-14)) - np.exp(-np.tanh(6)))) = 0.16143743821247852 - // b) r_center = Rmax * (np.arctanh(0.16143743821247852) + 14) / 20 = 0.7081431124450334 Rmax - r_jump = 0.7081; - } - else if (gyro::icntl[Param::alpha_coeff] == POISSON) { - r_jump = 0.5; // There is no jump for Poisson so this is an arbitrary choice - } - else { - throw std::runtime_error("Unknown alpha coeff"); - } - if (floor(nr * r_jump) > nr - (n_elems_refined / 2)) { - int new_n_elems_exp = log2(nr - floor(nr * r_jump)) + 1; - n_elems_refined = pow(2, new_n_elems_exp); - } - se = floor(nr * r_jump) - n_elems_refined / 2; - int ee = se + n_elems_refined; - // takeout - int st = ceil((double)n_elems_refined / 4.0 + 1) - 1; - int et = floor(3 * ((double)n_elems_refined / 4.0)); - - std::set r_set; - std::set r_set_p1; - int count = 0; - for (int i = 0; i < n_elems_refined; i++) { - r_set_p1.insert(r_tmp2[se + i]); - count++; - } - double half = fac / 2.0; - for (int k = 0; k < aniso; k++) { - std::set r_set_p1_tmp; - itr_p1 = r_set_p1.begin(); - int r_size = count; - count = 0; - for (int i = 0; i < r_size - 1; i++) { - r_set.insert((*itr_p1) + half); - if (k < aniso - 1 && i >= st && i < et) { - r_set_p1_tmp.insert(*(itr_p1)); - r_set_p1_tmp.insert(*(itr_p1) + half); - count += 2; - } - itr_p1++; - } - r_set_p1 = r_set_p1_tmp; - half *= 0.5; - } - // such that the total size is 8*x+1 (or we do not refine) - nr = nr + r_set.size(); - int shift = 0; - shift = std::min(nr % 8 - 1, (int)r_set.size()); - itr = r_set.begin(); - std::advance(itr, shift); - r_set.erase(r_set.begin(), itr); - for (int i = 0; i < n_elems_refined; i++) - r_set.insert(r_tmp2[se + i]); - // group all in r_tmp - nr = n_elems_equi - n_elems_refined + r_set.size() + 1; - - r_tmp = std::vector(nr); - for (int i = 0; i < se; i++) - r_tmp[i] = r_tmp2[i]; - itr = r_set.begin(); - for (int i = 0; i < (int)r_set.size(); i++) { - r_tmp[se + i] = *itr; - itr++; - } - for (int i = 0; i < n_elems_equi - ee + 1; i++) - r_tmp[se + r_set.size() + i] = r_tmp2[ee + i]; - } - - // refine again by the middle - nr = 2 * nr - 1; - r = std::vector(nr); - for (int i = 0; i < nr; i++) { - if (!(i % 2)) - r[i] = r_tmp[i / 2]; - else - r[i] = 0.5 * (r_tmp[(i - 1) / 2] + r_tmp[(i + 1) / 2]); - } - if (gyro::icntl[Param::verbose] > 1) { - std::cout << "Parameter nr equals " + std::to_string(nr) << "." << std::endl; - } -} /* ----- end of level::build_r ----- */ - -/*! - * \brief Build the array theta - * - * Build the array theta, containing the coordinates in the direction theta, - * following an iso- or aniso-tropic division. - */ -void level::build_theta() -{ - // int ntheta_exp = gyro::icntl[Param::ntheta_exp]; - int periodic = gyro::icntl[Param::periodic]; - int aniso = gyro::icntl[Param::theta_aniso]; - - if (l > 0) - throw std::runtime_error("Function build_theta should only be called on the finest grid"); - if (aniso < 0 || aniso > 1) - throw std::runtime_error("Please choose anisotropy on theta as 0 or 1.\n"); - if (!aniso) { - ntheta = pow(2, ceil(log2(nr))); - double fac = 2 * PI / ntheta; - - // If not periodic BC on theta, last point is present (not implicit) - if (!periodic) - ntheta++; - - theta = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) - theta[i] = fac * i; - } - else { - if (gyro::icntl[Param::verbose] > 2) { - std::cout << "Anisotropy chosen in theta.\n"; - } - ntheta = pow(2, ceil(log2(nr)) - 1); - double fac = 2 * PI / ntheta; - - ntheta++; - std::vector theta_tmp = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) - theta_tmp[i] = fac * i; - for (int i = 1; i < ntheta - 3; i += 3) - theta_tmp[i] = theta_tmp[i] + 0.3 * (theta_tmp[i + 1] - theta_tmp[i]); - for (int i = 1; i < ntheta - 3; i += 5) - theta_tmp[i] = theta_tmp[i] + 0.5 * (theta_tmp[i + 1] - theta_tmp[i]); - - ntheta = 2 * ntheta - 1; - // If periodic BC on theta, last point is implicit - if (periodic) - ntheta--; - - theta = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) - if (!(i % 2)) - theta[i] = theta_tmp[i / 2]; - else - theta[i] = 0.5 * (theta_tmp[(i - 1) / 2] + theta_tmp[(i + 1) / 2]); - } -} /* ----- end of level::build_theta ----- */ - -/*! - * \brief Divides the intervals of the finest grid in half - * - * For a previsouly created finest polar grid, divides the intervals in half - * in both r and theta directions. Mainly used in order to compute order - * of approximations in tests (e.G. "implicitly extrapolated ..." paper). - * - */ -void gmgpolar::create_grid_polar_divide() -{ - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Dividing a coarser grid...\n"; - - int divide = gyro::icntl[Param::divideBy2]; - std::vector r_tmp; - std::vector theta_tmp; - - r_tmp = v_level[0]->r; - theta_tmp = v_level[0]->theta; - double last = v_level[0]->theta[v_level[0]->ntheta - 1]; - - //! divide the initial coarse grid at the center of the intervals - for (int k = 0; k < divide; k++) { //do this 'divide' times - std::vector r_tmp2; - std::vector theta_tmp2; - - //r - v_level[0]->nr = 2 * v_level[0]->nr - 1; //double the size of nr (fill gaps with new points) - r_tmp2 = std::vector(v_level[0]->nr); //new list for the coordinates (of larger size) - for (int i = 0; i < v_level[0]->nr; i++) { - if (!(i % 2)) - r_tmp2[i] = r_tmp[i / 2]; //use the available point - else - r_tmp2[i] = 0.5 * (r_tmp[(i - 1) / 2] + r_tmp[(i + 1) / 2]); //take the middle value - } - r_tmp = r_tmp2; - - //theta - if ((!fabs(last - 2 * PI)) < 1e-10 && gyro::icntl[Param::periodic]) { - v_level[0]->ntheta++; - theta_tmp2 = std::vector(v_level[0]->ntheta); - for (int i = 0; i < v_level[0]->ntheta - 1; ++i) { - theta_tmp2[i] = theta_tmp[i]; - } - theta_tmp2[v_level[0]->ntheta - 1] = 2 * PI; //add 2*PI to the theta array - theta_tmp = theta_tmp2; - } - - v_level[0]->ntheta = 2 * v_level[0]->ntheta - 1; //double the size of ntheta (fill gaps with new points) - theta_tmp2 = std::vector(v_level[0]->ntheta); - for (int i = 0; i < v_level[0]->ntheta; i++) { - if (!(i % 2)) - theta_tmp2[i] = theta_tmp[i / 2]; //use the available point - else - theta_tmp2[i] = 0.5 * (theta_tmp[(i - 1) / 2] + theta_tmp[(i + 1) / 2]); //take the middle value - } - - if (gyro::icntl[Param::periodic]) { - v_level[0]->ntheta--; - theta_tmp = std::vector(v_level[0]->ntheta); - for (int i = 0; i < v_level[0]->ntheta; ++i) { - theta_tmp[i] = theta_tmp2[i]; //leave out last value (2*PI) again - } - } - else { - theta_tmp = theta_tmp2; - } - } - - v_level[0]->r = r_tmp; - v_level[0]->theta = theta_tmp; - - gyro::dcntl[Param::R0] = v_level[0]->r[0]; - gyro::dcntl[Param::R] = v_level[0]->r[v_level[0]->nr - 1]; - gyro::dcntl[Param::THETA0] = v_level[0]->theta[0]; - gyro::dcntl[Param::THETA] = v_level[0]->theta[v_level[0]->ntheta - 1]; -} /* ----- end of level::create_grid_polar_divide ----- */ diff --git a/src/debug.cpp b/src/debug.cpp deleted file mode 100644 index b398f35e..00000000 --- a/src/debug.cpp +++ /dev/null @@ -1,576 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file debug.cpp - * \brief Comparison of function results with the matlab code (A, f, P, smoothers) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gmgpolar.h" - -inline void unit_test(std::stringstream& fname, int m, std::vector& uC, std::string vect_name, int test) -{ - std::fstream f; - std::vector data; - if (gyro::icntl[Param::debug] == 1) { - f.open(fname.str().c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << fname.str() << "\n"; - } - else { - while (1) { - double p; - f >> p; - if (f.eof()) - break; - data.push_back(p); - } - } - f.close(); - fname.clear(); - fname.str(std::string()); - if (data.size() == 0) { - std::cout << "Warning: array to test is empty."; - } - else { - if (test && data.size() > 0) { - for (int i = 0; i < m; i++) { - if (fabs(uC[i] - data[i]) > 1e-12) - std::cout << "i: " << i << ", uC[i]: " << uC[i] << ", " << vect_name << ": " << data[i] << "\n"; - assert(fabs(uC[i] - data[i]) < 1e-12); - } - } - if (!test) { - uC = data; - } - } - } - else { - if (test && uC.size() == 0) { - std::cout << "Warning: array to test is empty.\n"; - return; - } - if (!test) - std::srand(static_cast(std::time(nullptr))); - f.open(fname.str().c_str(), std::ios::out); - fname.clear(); - fname.str(std::string()); - if (!f) { - std::cout << "No such file\n"; - } - else { - for (int j = 0; j < m; j++) { - if (!test) { - double random_nb = (double)std::rand() / (double)RAND_MAX; - uC.push_back(random_nb); - } - f << std::setprecision(17) << uC[j] << "\n"; - } - } - f.close(); - fname.clear(); - fname.str(std::string()); - } -} - -inline void unit_test(std::stringstream& fname, int m, std::vector& uC, std::string vect_name, int test) -{ - std::fstream f; - std::vector data; - if (gyro::icntl[Param::debug] == 1) { - f.open(fname.str().c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << fname.str() << "\n"; - } - else { - while (1) { - int p; - f >> p; - if (f.eof()) - break; - data.push_back(p); - } - } - f.close(); - fname.clear(); - fname.str(std::string()); - if (data.size() == 0) { - std::cout << "Warning: array to test is empty."; - } - else { - for (int i = 0; i < m; i++) { - if (uC[i] != data[i]) - std::cout << "i: " << i << ", uC[i]: " << uC[i] << ", " << vect_name << ": " << data[i] << "\n"; - assert(uC[i] == data[i]); - } - } - } - else { - if (uC.size() == 0) { // Sometimes Asc is empty - std::cout << "Warning: array to test is empty.\n"; - return; - } - f.open(fname.str().c_str(), std::ios::out); - fname.clear(); - fname.str(std::string()); - if (!f) { - std::cout << "No such file\n"; - } - else { - for (int j = 0; j < m; j++) { - f << std::setprecision(17) << uC[j] << "\n"; - } - } - f.close(); - fname.clear(); - fname.str(std::string()); - } -} - -/*! - * \brief Check the implementation - * - * Compare the results of the current implementation with - * structures extracted from the MATLAB implementation. - * - */ -void gmgpolar::debug() -{ - std::stringstream ss, folder, fname; - std::fstream f, fr, fc; - int optimized = gyro::icntl[Param::optimized]; - int DirBC_Interior = gyro::icntl[Param::DirBC_Interior]; - int smoother = gyro::icntl[Param::smoother]; - int extrapolation = gyro::icntl[Param::extrapolation]; - double R = gyro::dcntl[Param::R]; - int prob = gyro::icntl[Param::prob]; - int mod_pk = gyro::icntl[Param::mod_pk]; - int alpha = gyro::icntl[Param::alpha_coeff]; - int beta = gyro::icntl[Param::beta_coeff]; - - ss << "debug_data/"; - if (gyro::icntl[Param::debug] != 1) { - const int dir_err0 = mkdir(ss.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - // if (-1 == dir_err0) { - // printf("Error creating directory!\n"); - // } - } - - ss << "OPTI-" << optimized << "_BC-" << DirBC_Interior << "_SMOOTH-" << smoother << "_EXTR-" << extrapolation - << "_R-" << R << "_PROB-" << prob << "_GEOM-" << mod_pk << "_A-" << alpha << "_B-" << beta << "/"; - - if (gyro::icntl[Param::debug] != 1) { - const int dir_err1 = mkdir(ss.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - // if (-1 == dir_err1) { - // printf("Error creating directory!\n"); - // } - } - - /////////////////////////////////////////////////////////// - // Parameters: params.txt (compute_rho, cycle, delta_e, fac_ani, kappa_eps, levels, maxiter, mod_pk, nr, ntheta, periodic, plotit, R0, r0_DB, rDBC(1), rDBC(2), Rmax, solveit, v1, v2) - /////////////////////////////////////////////////////////// - std::cout << "Checking parameters...\n"; - fname << ss.str() << "params.txt"; - std::vector parray; - if (gyro::icntl[Param::debug] == 1) { - f.open(fname.str().c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << fname.str() << "\n"; - } - else { - while (1) { - double p; - f >> p; - parray.push_back(p); - // std::cout << p << "\n"; - if (f.eof()) - break; - } - - assert(gyro::icntl[Param::optimized] == parray[0]); - // assert(gyro::icntl[Param::verbose] == parray[1]); - // assert(gyro::icntl[Param::openmp] == parray[2]); - // assert(gyro::icntl[Param::matrix_free] == parray[3]); - // assert(gyro::icntl[Param::debug] == parray[1]); - assert(gyro::icntl[Param::nr_exp] == (int)parray[1]); - assert(gyro::icntl[Param::ntheta_exp] == (int)parray[2]); - assert(gyro::icntl[Param::fac_ani] == (int)parray[3]); - assert(gyro::icntl[Param::theta_aniso] == (int)parray[4]); - assert(gyro::icntl[Param::v1] == (int)parray[5]); - assert(gyro::icntl[Param::v2] == (int)parray[6]); - assert(gyro::icntl[Param::cycle] == (int)parray[7]); - assert(gyro::icntl[Param::mod_pk] == (int)parray[8]); - assert(gyro::icntl[Param::compute_rho] == (int)parray[9]); - assert(gyro::icntl[Param::level] == (int)parray[10]); - assert(gyro::icntl[Param::plotit] == (int)parray[11]); - assert(gyro::icntl[Param::solveit] == (int)parray[12]); - assert(gyro::icntl[Param::maxiter] == (int)parray[13]); - assert(gyro::icntl[Param::periodic] == (int)parray[14]); - assert(gyro::icntl[Param::origin_NOT_coarse] == (int)parray[15]); - assert(gyro::icntl[Param::smoother] == (int)parray[16]); - assert(gyro::icntl[Param::discr] == (int)parray[17]); - assert(gyro::icntl[Param::extrapolation] == (int)parray[18]); - assert(gyro::icntl[Param::DirBC_Interior] == (int)parray[19]); - assert(gyro::icntl[Param::paraview] == (int)parray[20]); - assert(gyro::icntl[Param::divideBy2] == (int)parray[21]); - assert(gyro::icntl[Param::prob] == (int)parray[22]); - assert(gyro::icntl[Param::alpha_coeff] == (int)parray[23]); - assert(gyro::icntl[Param::beta_coeff] == (int)parray[24]); - assert(gyro::icntl[Param::res_norm] == (int)parray[25]); - assert(fabs(gyro::dcntl[Param::r0_DB] - parray[26]) < 1e-12); - assert(fabs(gyro::dcntl[Param::R0] - parray[27]) < 1e-12); - assert(fabs(gyro::dcntl[Param::R] - parray[28]) < 1e-12); - assert(fabs(gyro::dcntl[Param::THETA0] - parray[29]) < 1e-12); - assert(fabs(gyro::dcntl[Param::THETA] - parray[30]) < 1e-12); - assert(fabs(gyro::dcntl[Param::kappa_eps] - parray[31]) < 1e-12); - assert(fabs(gyro::dcntl[Param::delta_e] - parray[32]) < 1e-12); - assert(fabs(gyro::dcntl[Param::tol_bound_check] - parray[33]) < 1e-12); - assert(fabs(gyro::dcntl[Param::rel_red_conv] - parray[34]) < 1e-12); - } - f.close(); - fname.clear(); //clear any bits set - fname.str(std::string()); - } - else { - f.open(fname.str().c_str(), std::ios::out); - if (!f) { - std::cout << "No such file: " << fname.str() << "\n"; - } - else { - f << gyro::icntl[Param::optimized] << "\n"; - // f << gyro::icntl[Param::verbose] << "\n"; - // f << gyro::icntl[Param::openmp] << "\n"; - // f << gyro::icntl[Param::matrix_free] << "\n"; - // f << gyro::icntl[Param::debug] << "\n"; - f << gyro::icntl[Param::nr_exp] << "\n"; - f << gyro::icntl[Param::ntheta_exp] << "\n"; - f << gyro::icntl[Param::fac_ani] << "\n"; - f << gyro::icntl[Param::theta_aniso] << "\n"; - f << gyro::icntl[Param::v1] << "\n"; - f << gyro::icntl[Param::v2] << "\n"; - f << gyro::icntl[Param::cycle] << "\n"; - f << gyro::icntl[Param::mod_pk] << "\n"; - f << gyro::icntl[Param::compute_rho] << "\n"; - f << gyro::icntl[Param::level] << "\n"; - f << gyro::icntl[Param::plotit] << "\n"; - f << gyro::icntl[Param::solveit] << "\n"; - f << gyro::icntl[Param::maxiter] << "\n"; - f << gyro::icntl[Param::periodic] << "\n"; - f << gyro::icntl[Param::origin_NOT_coarse] << "\n"; - f << gyro::icntl[Param::smoother] << "\n"; - f << gyro::icntl[Param::discr] << "\n"; - f << gyro::icntl[Param::extrapolation] << "\n"; - f << gyro::icntl[Param::DirBC_Interior] << "\n"; - f << gyro::icntl[Param::paraview] << "\n"; - f << gyro::icntl[Param::divideBy2] << "\n"; - f << gyro::icntl[Param::prob] << "\n"; - f << gyro::icntl[Param::alpha_coeff] << "\n"; - f << gyro::icntl[Param::beta_coeff] << "\n"; - f << gyro::icntl[Param::res_norm] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::r0_DB] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::R0] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::R] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::THETA0] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::THETA] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::kappa_eps] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::delta_e] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::tol_bound_check] << "\n"; - f << std::setprecision(17) << gyro::dcntl[Param::rel_red_conv] << "\n"; - } - f.close(); - fname.clear(); //clear any bits set - fname.str(std::string()); - } - - // std::cout << "No test on the size of the i,j,val vectors: explicit zeros removed in matlab.\n"; - - std::vector u_rand0; - for (int l = 0; l < levels; l++) { - std::cout << "--------- debug on level " << l << "--------- \n"; - folder << ss.str() << l << "/"; - int m = v_level[l]->m; - - if (gyro::icntl[Param::debug] == 1) { - const int dir_err2 = mkdir(folder.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - // if (-1 == dir_err2) { - // printf("Error creating directory!\n"); - // } - } - - // Random test vector - std::vector u_rand; - fname << folder.str() << "rand.txt"; - unit_test(fname, m, u_rand, "u_rand", 0); - if (l == 0) - u_rand0 = u_rand; - - /////////////////////////////////////////////////////////// - // Grids: r.txt, theta.txt - /////////////////////////////////////////////////////////// - std::cout << "Checking grid (r, theta)...\n"; - std::vector r_tmp, theta_tmp; - - fname << folder.str() << "r.txt"; - unit_test(fname, v_level[l]->nr, v_level[l]->r, "v_level[l]->r", 1); - - fname << folder.str() << "theta.txt"; - unit_test(fname, v_level[l]->ntheta, v_level[l]->theta, "v_level[l]->theta", 1); - - /////////////////////////////////////////////////////////// - // Linear problem: - /////////////////////////////////////////////////////////// - // - row_indices.txt, col_indices.txt, vals.txt - std::cout << "Checking Operator A...\n"; - std::vector uC(m, 0); - if (gyro::icntl[Param::optimized] == 0) - v_level[l]->apply_A0(u_rand, uC); - else - v_level[l]->apply_A(u_rand, uC); - fname << folder.str() << "Au.txt"; - unit_test(fname, m, uC, "Au", 1); - - // - row_Ac_LU.txt, col_Ac_LU.txt, vals_Ac_LU.txt - if (l == levels - 1) { - std::cout << "Checking Coarsest grid Ac...\n"; - uC = std::vector(m, 0); - for (std::size_t j = 0; j < u_rand.size(); j++) { - uC[v_level[l]->row_Ac_LU[j]] += v_level[l]->vals_Ac_LU[j] * u_rand[v_level[l]->col_Ac_LU[j]]; - } - fname << folder.str() << "Acu.txt"; - unit_test(fname, m, uC, "Acu", 1); - - uC = std::vector(m, 0); - std::cout << "Checking Operator Ac^-1...\n"; - fname << folder.str() << "Acinvu.txt"; - std::vector Ainv_coarse = v_level[l]->solve_gaussian_elimination( - v_level[l]->row_Ac_LU, v_level[l]->col_Ac_LU, v_level[l]->vals_Ac_LU, u_rand); - unit_test(fname, m, uC, "Acinvu", 1); - } - - // - f.txt - if (l == 0 || (l == 1 && gyro::icntl[Param::extrapolation] > 0)) { - std::cout << "Checking RHS...\n"; - fname << folder.str() << "f.txt"; - unit_test(fname, m, v_level[l]->fVec, "v_level[l]->fVec", 1); - } - - // - betaVec.txt - if (gyro::icntl[Param::beta_coeff] > 0) { - std::cout << "Checking Beta vector...\n"; - fname << folder.str() << "betaVec.txt"; - unit_test(fname, v_level[l]->betaVec.size(), v_level[l]->betaVec, "v_level[l]->betaVec", 1); - } - - /////////////////////////////////////////////////////////// - // Multigrid (l-1): - if (l == levels - 1) - break; - /////////////////////////////////////////////////////////// - int mc = v_level[l]->mc; - - // - coarse_nodes_r.txt, coarse_nodes_theta.txt - std::cout << "Checking coarse grids r...\n"; - fname << folder.str() << "coarse_nodes_r.txt"; - unit_test(fname, v_level[l]->coarse_nodes_list_r.size(), v_level[l]->coarse_nodes_list_r, - "v_level[l]->coarse_nodes_list_r", 1); - - std::cout << "Checking coarse grids theta...\n"; - fname << folder.str() << "coarse_nodes_theta.txt"; - unit_test(fname, v_level[l]->coarse_nodes_list_theta.size(), v_level[l]->coarse_nodes_list_theta, - "v_level[l]->coarse_nodes_list_theta", 1); - - // - row_indices_prol.txt, col_indices_prol.txt, vals_prol.txt - std::cout << "Checking Prolongation P...\n"; - fname << folder.str() << "Pu.txt"; - if (gyro::icntl[Param::optimized] == 0) - uC = v_level[l]->apply_prolongation_bi0(u_rand, mc, m, v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - else - uC = v_level[l]->apply_prolongation_bi(u_rand); - unit_test(fname, m, uC, "Pu", 1); - - if (gyro::icntl[Param::extrapolation] > 0 && l == 0) { - // - row_indices_prol_ex.txt, col_indices_prol_ex.txt, vals_prol_ex.txt - std::cout << "Checking Prolongation Pex...\n"; - fname << folder.str() << "Pexu.txt"; - if (gyro::icntl[Param::optimized] == 0) - uC = v_level[l]->apply_prolongation_ex0(u_rand, mc, m, v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - else - uC = v_level[l]->apply_prolongation_ex(u_rand); - unit_test(fname, m, uC, "Pexu", 1); - - // - row_indices_prol_inj.txt, col_indices_prol_inj.txt, vals_prol_inj.txt - std::cout << "Checking Prolongation Pinj...\n"; - fname << folder.str() << "Pinju.txt"; - if (gyro::icntl[Param::optimized] == 0) - uC = v_level[l]->apply_prolongation_inj0(u_rand, mc, m, v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - else - uC = v_level[l]->apply_prolongation_inj(u_rand); - unit_test(fname, m, uC, "Pinju", 1); - } - - // - row_indices_Asc_s_c.txt, col_indices_Asc_s_c.txt, vals_Asc_s_c.txt - std::cout << "Checking Smoother Matrices Asc...\n"; - uC.clear(); - int start = 0, end = 0; - std::vector Ascu; - for (int smoother = 0; smoother < 2; smoother++) { - for (int color = 0; color < 2; color++) { - int smoother_ind = smoother * 2 + color; - int m_sc = v_level[l]->m_sc[smoother_ind]; - for (int ij = 0; ij < v_level[l]->nblocks[smoother_ind]; ij++) { - start = end; - end += m_sc; - std::vector::const_iterator first = u_rand.begin() + start; - std::vector::const_iterator last = u_rand.begin() + end; - std::vector u_rand_sc(first, last); - Ascu = std::vector(m_sc, 0); - for (int j = 0; j < v_level[l]->A_Zebra_r_LU_row[smoother_ind][ij].size(); j++) { - Ascu[v_level[l]->A_Zebra_r_LU_row[smoother_ind][ij][j]] += - v_level[l]->A_Zebra_v_LU_row[smoother_ind][ij][j] * - u_rand_sc[v_level[l]->A_Zebra_c_LU_row[smoother_ind][ij][j]]; - } - uC.insert(uC.end(), Ascu.begin(), Ascu.end()); - } - } - } - fname << folder.str() << "Ascu.txt"; - unit_test(fname, m, uC, "Ascu", 1); - - std::cout << "Checking Asc^-1...\n"; - uC.clear(); - start = 0; - end = 0; - std::vector Ascinvu; - for (int smoother = 0; smoother < 2; smoother++) { - for (int color = 0; color < 2; color++) { - int smoother_ind = smoother * 2 + color; - int m_sc = v_level[l]->m_sc[smoother_ind]; - for (int ij = 0; ij < v_level[l]->nblocks[smoother_ind]; ij++) { - start = end; - end += m_sc; - std::vector::const_iterator first = u_rand.begin() + start; - std::vector::const_iterator last = u_rand.begin() + end; - std::vector u_rand_sc(first, last); - if (v_level[l]->A_Zebra_r_row[smoother_ind][ij].size() == 0) { - continue; - } - // Dirichlet or size of system is 1 (diagonal solve) - if ((smoother_ind == 0 && ij == 0 && gyro::icntl[Param::DirBC_Interior]) || m_sc == 1 || - (gyro::icntl[Param::extrapolation] && l == 0 && smoother_ind % 2 == 0 && - !(smoother_ind == 0 && !gyro::icntl[Param::DirBC_Interior] && ij == 0))) { - Ascinvu = v_level[l]->solve_diag(v_level[l]->A_Zebra_v_row[smoother_ind][ij], u_rand_sc); - } - // Circle (not across) - else if (smoother_ind < 2 && - !(smoother_ind == 0 && !gyro::icntl[Param::DirBC_Interior] && ij == 0)) { - Ascinvu = v_level[l]->solve_circle(v_level[l]->A_Zebra_r_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_c_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_v_LU_row[smoother_ind][ij], u_rand_sc); - } - // Radial (not across) - else if (smoother_ind > 1) { - Ascinvu = v_level[l]->solve_radial(v_level[l]->A_Zebra_r_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_c_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_v_LU_row[smoother_ind][ij], u_rand_sc); - } - // Across (direct solver) - else { - Ascinvu = v_level[l]->solve_gaussian_elimination(v_level[l]->A_Zebra_r_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_c_LU_row[smoother_ind][ij], - v_level[l]->A_Zebra_v_LU_row[smoother_ind][ij], - u_rand_sc); - } - uC.insert(uC.end(), Ascinvu.begin(), Ascinvu.end()); - } - } - } - fname << folder.str() << "Ascinvu.txt"; - unit_test(fname, m, uC, "Ascinvu", 1); - - // - row_indices_Asc_ortho_s_c.txt, col_indices_Asc_ortho_s_c.txt, vals_Asc_ortho_s_c.txt - std::cout << "Checking Smoother Complement Matrices Asc_ortho...\n"; - uC.clear(); - for (int smoother = 0; smoother < 2; smoother++) { - for (int color = 0; color < 2; color++) { - int smoother_ind = smoother * 2 + color; - int m_sc = v_level[l]->nblocks[smoother_ind] * v_level[l]->m_sc[smoother_ind]; - std::vector Asc_orthou(m_sc, 0); - v_level[l]->u = u_rand; - if (gyro::icntl[Param::optimized] == 0) - v_level[l]->apply_Asc_ortho0(Asc_orthou, smoother_ind); - else { - int sm = (smoother_ind < 2) ? 1 - smoother_ind : 5 - smoother_ind; - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - v_level[l]->apply_Asc_ortho(Asc_orthou, v_level[l]->u, smoother_ind, 0, 0, - v_level[l]->dep_Asc[smoother_ind], v_level[l]->dep_Asc[sm], - v_level[l]->dep_Asc[1], v_level[l]->dep_Asc[smoother_ind]); - } - else { //radial - v_level[l]->apply_Asc_ortho(Asc_orthou, v_level[l]->u, smoother_ind, 0, 0, - v_level[l]->dep_Asc[smoother_ind], v_level[l]->dep_Asc[sm], - v_level[l]->dep_Asc[1], v_level[l]->dep_Asc[smoother_ind]); - } - } - else { - v_level[l]->apply_Asc_ortho(Asc_orthou, v_level[l]->u, smoother_ind, 0, 0, - v_level[l]->dep_Asc[smoother_ind], v_level[l]->dep_Asc[sm], - v_level[l]->dep_Asc[1], v_level[l]->dep_Asc_ortho[smoother_ind]); - } - } - uC.insert(uC.end(), Asc_orthou.begin(), Asc_orthou.end()); - } - } - fname << folder.str() << "Asc_orthou.txt"; - unit_test(fname, m, uC, "Asc_orthou", 1); - - folder.clear(); //clear any bits set - folder.str(std::string()); - } - - /////////////////////////////////////////////////////////// - // Checking whole multigrid cycle - /////////////////////////////////////////////////////////// - std::cout << "Checking multigrid iteration...\n"; - v_level[0]->u = u_rand0; - if (gyro::icntl[Param::extrapolation] > 0) - v_level[1]->fVec_initial = v_level[1]->fVec; //Extrapolation: store the initial fVec on level 1 - multigrid_cycle_extrapol(0); - fname << ss.str() << "0/MG_cycle_rand.txt"; - unit_test(fname, v_level[0]->m, v_level[0]->u, "MG_cycle_rand", 1); - - std::cout << "Checking residual...\n"; - std::vector res_M; - compute_residual(0, gyro::icntl[Param::extrapolation]); - fname << ss.str() << "0/error_residual.txt"; - unit_test(fname, v_level[0]->m, v_level[0]->res, "residual", 1); - - std::cout << "Checking error...\n"; - std::vector error_M; - std::vector error = compute_error(); - fname << ss.str() << "0/error_rand.txt"; - unit_test(fname, v_level[0]->m, error, "error", 1); -} /* ----- end of gmgpolar::debug ----- */ diff --git a/src/define_coarse_nodes.cpp b/src/define_coarse_nodes.cpp deleted file mode 100644 index e3ee764f..00000000 --- a/src/define_coarse_nodes.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file define_coarse_nodes.cpp - * \brief Implementation of the coarsening - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gmgpolar.h" -#include "level.h" - -/*! - * \brief Define the coarse nodes on all levels - * - * Defines coarse nodes on all level (two columns per level) by recursively - * calling define_coarse_nodes_onelevel(); using a vector of arrays r/theta - * to store the different levels. - * - nodes are ordered (per level) circlewise starting with r_min (here r_0, in - * article denoted r_1) - * - [-1, -1]: means that this node is not a coarse node - * [m, n]: means that this node (with r_m+1 and theta_n) is coarse node - * - */ -void gmgpolar::define_coarse_nodes() -{ - // int periodic = gyro::icntl[Param::periodic]; - - for (int i = 1; i < levels; i++) { - level* new_level = new level(i); - v_level.push_back(new_level); - } - levels_orig = levels; - for (int i = 0; i < levels; i++) { - if (gyro::icntl[Param::verbose] > 3) - std::cout << "=> Defining coarse nodes on level " << i << "\n"; - v_level[i]->store_theta_n_co(); - if (i < levels - 1) { - v_level[i]->define_coarse_nodes_onelevel(v_level[i + 1]); - } - if (gyro::icntl[Param::verbose] > 3) { - std::cout << "level: " << i; - if (i != levels - 1) - std::cout << ", coarse_nodes: " << v_level[i]->coarse_nodes; - std::cout << std::endl; - std::cout << "nr: " << v_level[i]->nr << ", ntheta: " << v_level[i]->ntheta << "\n"; - } - if (i != levels - 1 && - (v_level[i]->nr % 2 != 1 || v_level[i]->nr < 5 || v_level[i]->ntheta % 2 != 0 || v_level[i]->ntheta < 8)) { - std::cout << "WARNING: Cannot reach the desired number of levels (" << levels << "). Replacing it with " - << i + 1 << "...\n"; - ; - levels = i + 1; - break; - } - } -} /* ----- end of gmgpolar::define_coarse_nodes ----- */ - -/*! - * \brief Define the coarse nodes on one level - * - * defines coarse nodes on one level (two columns) - * - nodes are ordered circlewise starting with r_min (here r_0, in article - * denoted r_1) - * - [-1, -1]: means that this node is not a coarse node - * [m, n]: means that this node (with r_m+1 and theta_n) is coarse node - * - * \param coarser: the next coarser level - * - */ -void level::define_coarse_nodes_onelevel(level* coarser) -{ - // int periodic = gyro::icntl[Param::periodic]; - - // int count_coarse = 0, type; - std::set indices_r; - std::set indices_theta; - coarse_nodes = (nr_int + 1) * ntheta_int; - coarse_nodes_list_r = std::vector(coarse_nodes, -1); - coarse_nodes_list_theta = std::vector(coarse_nodes, -1); - for (int j = 0; j < nr_int + 1; j += 2) { - for (int i = 0; i < ntheta_int; i += 2) { - - coarse_nodes_list_r[j * ntheta_int + i] = j; - coarse_nodes_list_theta[j * ntheta_int + i] = i; - - indices_r.insert(j); - indices_theta.insert(i); - } - } - - std::set>::iterator itr_r, itr_theta; - - coarser->nr = (int)indices_r.size(); - coarser->r = std::vector(coarser->nr); - coarser->ntheta = (int)indices_theta.size(); - coarser->theta = std::vector(coarser->ntheta); - - itr_r = indices_r.begin(); - for (int i = 0; i < coarser->nr; i++) { - coarser->r[i] = r[*itr_r]; - itr_r++; - } - - itr_theta = indices_theta.begin(); - for (int i = 0; i < coarser->ntheta; i++) { - coarser->theta[i] = theta[*itr_theta]; - itr_theta++; - } - - if (gyro::icntl[Param::verbose] > 5) { - display_r(); - display_theta(); - std::cout << "Coarse grid: \n"; - gyro::disp(coarse_nodes_list_r, "coarse_nodes_list_r"); - gyro::disp(coarse_nodes_list_theta, "coarse_nodes_list_theta"); - } -} /* ----- end of level::define_coarse_nodes_onelevel ----- */ - -/*! - * \brief Define the coarse nodes on one level - * - * defines coarse nodes on one level (two columns) - * - nodes are ordered circlewise starting with r_min (here r_0, in article - * denoted r_1) - * - [-1, -1]: means that this node is not a coarse node - * [m, n]: means that this node (with r_m+1 and theta_n) is coarse node - * - */ -void level::store_theta_n_co() -{ - // Define number of intervals - nr_int = nr - 1; - ntheta_int = ntheta; - if (fabs(theta[ntheta - 1] - 2 * PI) < 1e-10) // check if end is 2*Pi (for periodic boundary conditions) - ntheta_int--; - if (ntheta_int % 2) - std::cout << "WARNING: The number of thetas is odd. Please use even numbers only.\n"; - - // To take first/last theta into account without conditions: - // - theta_per = [theta_last, theta, 2PI] - theta_per = std::vector(ntheta_int + 2); - theta_per[0] = theta[ntheta_int - 1]; - for (int i = 0; i < ntheta_int; i++) - theta_per[i + 1] = theta[i]; - theta_per[ntheta_int + 1] = 2 * PI; - - cos_theta_per = std::vector(ntheta_int + 2); - sin_theta_per = std::vector(ntheta_int + 2); - for (int i = 0; i < ntheta_int + 2; i++) { - cos_theta_per[i] = cos(theta_per[i]); - sin_theta_per[i] = sin(theta_per[i]); - } - - // Store cosines/sines (expensive) - cos_theta = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) { - cos_theta[i] = cos(theta[i]); - } - sin_theta = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) { - sin_theta[i] = sin(theta[i]); - } - - // Store theta+PI (only O(ntheta)) and associated cosines/sines (expensive) - theta_PI = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) { - theta_PI[i] = theta[i] + PI; - } - cos_theta_PI = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) { - cos_theta_PI[i] = cos(theta_PI[i]); - } - sin_theta_PI = std::vector(ntheta); - for (int i = 0; i < ntheta; i++) { - sin_theta_PI[i] = sin(theta_PI[i]); - } - - // Size of intervals in theta - // thetaplus = [k_last, thetaplus, k_last] - thetaplus = std::vector(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - thetaplus[i] = theta[i + 1] - theta[i]; - thetaplus[ntheta_int - 1] = 2 * PI - theta[ntheta_int - 1]; - - // Size of intervals in theta - // thetaplus_per = [k_last, thetaplus, k_last] - thetaplus_per = std::vector(ntheta_int + 1); - for (int i = 1; i < ntheta_int; i++) - thetaplus_per[i] = theta_per[i + 1] - theta_per[i]; - thetaplus_per[ntheta_int] = 2 * PI - theta_per[ntheta_int]; - thetaplus_per[0] = thetaplus_per[ntheta_int]; - - // Size of intervals in r - hplus = std::vector(nr_int); - for (int i = 0; i < nr_int; i++) - hplus[i] = r[i + 1] - r[i]; - - if (gyro::icntl[Param::verbose] > 5) { - gyro::disp(theta_per, "theta_per"); - gyro::disp(cos_theta, "cos_theta"); - gyro::disp(sin_theta, "sin_theta"); - gyro::disp(theta_PI, "theta_PI"); - gyro::disp(cos_theta_PI, "cos_theta_PI"); - gyro::disp(sin_theta_PI, "sin_theta_PI"); - gyro::disp(thetaplus, "thetaplus"); - gyro::disp(thetaplus_per, "thetaplus_per"); - gyro::disp(hplus, "hplus"); - } -} /* ----- end of level::store_theta_n_co ----- */ diff --git a/src/direct_solve.cpp b/src/direct_solve.cpp deleted file mode 100644 index 4b021225..00000000 --- a/src/direct_solve.cpp +++ /dev/null @@ -1,815 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file direct_solve.cpp - * \brief Implementation of the direct solver for the coarse grid operator and the smoother - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -#ifdef GMGPOLAR_USE_MUMPS -/*! - * \brief Initialization of a MUMPS structure - * - * Initialize the MUMPS structure: calls dmumps_c with job=-1 - * - * \param mumps: the structure - */ -void level::init_mumps(DMUMPS_STRUC_C& mumps) -{ - mumps.sym = 0; // symmetric - mumps.par = 1; // working host - mumps.comm_fortran = -987654; // MPI_COMM_WORLD - mumps.job = -1; // Initialization - - dmumps_c(&mumps); -} /* ----- end of level::init_mumps ----- */ - -/*! - * \brief Analysis and factorization with MUMPS (no RHS) - * - * Analysis and factorization with MUMPS (no RHS): calls dmumps_c with job=4 - * - * \param mumps: the structure - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param m_solution: size of the solutions in MUMPS - */ -void level::facto_mumps(DMUMPS_STRUC_C& mumps, std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, int m_solution) -{ - int nz = A_row_indices.size(); - mumps.job = 4; - mumps.n = m_solution; - mumps.nz = nz; - mumps.irn = new int[nz]; - mumps.jcn = new int[nz]; - mumps.a = new double[nz]; - for (int j = 0; j < nz; j++) { - mumps.irn[j] = A_row_indices[j] + 1; - mumps.jcn[j] = A_col_indices[j] + 1; - mumps.a[j] = A_vals[j]; - } - mumps.lrhs = mumps.n; - mumps.nrhs = 1; - mumps.rhs = new double[mumps.lrhs]; - mumps.ICNTL(1) = 0; - mumps.ICNTL(2) = 0; - mumps.ICNTL(3) = 0; - mumps.ICNTL(4) = 0; - mumps.ICNTL(7) = 5; - dmumps_c(&(mumps)); - mumps.job = 3; -} /* ----- end of level::facto_mumps ----- */ - -/*! - * \brief Solve with MUMPS on a specific RHS - * - * Solve with MUMPS on a specific RHS: calls dmumps_c with job=3 - * - * \param mumps: the structure - * \param f: the RHS - */ -std::vector level::solve_mumps(DMUMPS_STRUC_C& mumps, std::vector f) -{ - std::vector sol(mumps.lrhs); - - for (int i = 0; i < mumps.lrhs; i++) { - mumps.rhs[i] = f[i]; - } - dmumps_c(&(mumps)); - for (int i = 0; i < mumps.lrhs; i++) { - sol[i] = mumps.rhs[i]; - } - - return sol; -} /* ----- end of level::solve_mumps ----- */ - -/*! - * \brief Finalization of a MUMPS structure - * - * Finalization the MUMPS structure: calls dmumps_c with job=-2 - * - * \param mumps: the structure - */ -void level::finalize_mumps(DMUMPS_STRUC_C& mumps) -{ - int job_cur = mumps.job; - mumps.job = -2; - mumps.ICNTL(1) = 0; - mumps.ICNTL(2) = 0; - mumps.ICNTL(3) = 0; - mumps.ICNTL(4) = 0; - dmumps_c(&mumps); - if (job_cur == 3) { - delete[] mumps.a; - delete[] mumps.irn; - delete[] mumps.jcn; - delete[] mumps.rhs; - } -} /* ----- end of level::finalize_mumps ----- */ -#endif - -/*! - * \brief Factorization of A using an in-house sparse solver - * - * Factorization of A using an in-house sparse solver - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param m_solution: size of the solutions in MUMPS - */ -void level::facto_gaussian_elimination(std::vector& A_row_indices, std::vector& A_col_indices, - std::vector& A_vals, int m_solution) - -{ - // Factorization with Gaussian elimination - int row = A_row_indices[0]; - double pivot; - std::vector cols; - std::vector vals; - std::vector rows_L; - std::vector vals_L; - - std::vector A_row_ptr(m_solution + 1, 0); - int count = 1; - for (std::size_t k = 0; k < A_row_indices.size() + 1; ++k) { - if (k == A_row_indices.size() || A_row_indices[k] != row) { - A_row_ptr[count] = k; - count++; - if (k != A_row_indices.size()) - row = A_row_indices[k]; - } - } - - row = A_row_indices[0]; - // Go through the list and accumulate the elements of a same row (assume increasing rows) - for (std::size_t k = 0; k < A_row_indices.size() + 1; ++k) { - - // If new row, construct col of L and row of U - if (k == A_row_indices.size() || row != A_row_indices[k]) { - // Update the column of L with L(j,k) = U(j,k) / U(k,k) - // i.e. to save storage: A(j,k) = A(j,k) / A(k,k), j > k - for (std::size_t j = k; j < A_row_indices.size(); ++j) { - // col == k and row > col - if (A_col_indices[j] == row && A_row_indices[j] > A_col_indices[j]) { - A_vals[j] /= pivot; - rows_L.push_back(A_row_indices[j]); - vals_L.push_back(A_vals[j]); - } - } - - // Update already existing entries - std::vector add_rows, add_cols, add_index; - std::vector add_vals; - for (std::size_t j = k; j < A_row_indices.size(); ++j) { - if (A_row_indices[j] < row) - throw std::runtime_error("Loop through previous row in Gaussian elimination, should not happen if " - "rows sorted in increasing order in the matrix."); - - // If row == k or col <= k, continue searching - if (A_row_indices[j] == row || A_col_indices[j] <= row) - continue; - - // col not in pivot row (U_ki = 0) or row not in L_k (L_jk = 0), continue searching - auto col_ind = std::find(cols.begin(), cols.end(), A_col_indices[j]); - auto row_ind = std::find(rows_L.begin(), rows_L.end(), A_row_indices[j]); - if (col_ind == cols.end() || row_ind == rows_L.end()) - continue; - // Else, update the row of U with U(j,i) = U(j,i) - L(j,k) * U(k,i) - // i.e. to save storage: A(j,i) = A(j,i) - A(j,k) * A(k,i), j > k - A_vals[j] -= vals_L[row_ind - rows_L.begin()] * vals[col_ind - cols.begin()]; - add_rows.push_back(A_row_indices[j]); - add_cols.push_back(A_col_indices[j]); - add_vals.push_back(A_vals[j]); - } - - // Take fill-in into account: values at the intersection of entries L_jk and U_ki - std::vector add_rows_FI_tot, add_cols_FI_tot; - std::vector add_vals_FI_tot; - for (std::size_t j = 0; j < rows_L.size(); ++j) { - std::vector add_rows_FI, add_cols_FI; - std::vector add_vals_FI; - for (std::size_t i = 0; i < cols.size(); ++i) { - // Only update the upper part of U - if (cols[i] <= row || rows_L[j] <= row) - continue; - - // Check if entry exists: was already updated - int exists = 0; - for (std::size_t k = 0; k < add_rows.size(); k++) - if (add_rows[k] == rows_L[j] && add_cols[k] == cols[i]) { - exists = 1; - break; - } - if (exists) - continue; - - // Else, update the row of U with U(j,i) = U(j,i) - L(j,k) * U(k,i) - // i.e. to save storage: A(j,i) = A(j,i) - A(j,k) * A(k,i), j > k - add_rows_FI.push_back(rows_L[j]); - add_cols_FI.push_back(cols[i]); - add_vals_FI.push_back(-vals_L[j] * vals[i]); - } - A_row_indices.insert(A_row_indices.begin() + A_row_ptr[rows_L[j] + 1], add_rows_FI.begin(), - add_rows_FI.end()); - A_col_indices.insert(A_col_indices.begin() + A_row_ptr[rows_L[j] + 1], add_cols_FI.begin(), - add_cols_FI.end()); - A_vals.insert(A_vals.begin() + A_row_ptr[rows_L[j] + 1], add_vals_FI.begin(), add_vals_FI.end()); - - for (std::size_t r = rows_L[j] + 1; r < A_row_ptr.size(); r++) - A_row_ptr[r] += add_rows_FI.size(); - } - - // New row: - if (k < A_row_indices.size()) { - row = A_row_indices[k]; - // - empty columns/rows and values for pivot row and L_k - cols.clear(); - vals.clear(); - rows_L.clear(); - vals_L.clear(); - // - loop again on this entry - if (k != A_row_indices.size()) - k--; - } - } - // If same row, store the values and col indices - else { - // Do not consider values from L - if (A_col_indices[k] < row) - continue; - if (A_col_indices[k] == row) { - pivot = A_vals[k]; - if (pivot == 0) - throw std::runtime_error("Null pivot found in Gaussian elimination."); - } - cols.push_back(A_col_indices[k]); - vals.push_back(A_vals[k]); - } - } -} /* ----- end of level::facto_gaussian_elimination ----- */ - -/*! - * \brief Solve on a specific RHS using an in-house sparse solver - * - * Solve on a specific RHS using an in-house sparse solver - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param f: the RHS - */ -std::vector level::solve_gaussian_elimination(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f) -{ - // int m_solution = f.size(); - - if (gyro::icntl[Param::verbose] > 3) { - std::cout << "Starting Gaussian elimination forward substitution \n"; - } - // Solve Ly = b for y (Forward Substitution) - // (assumes rows in increasing order) - int row = A_row_indices[0]; - std::vector y(f); - for (std::size_t j = 0; j < A_row_indices.size(); ++j) { - if (A_col_indices[j] >= A_row_indices[j]) - continue; - y[A_row_indices[j]] -= y[A_col_indices[j]] * A_vals[j]; - } - - if (gyro::icntl[Param::verbose] > 3) { - std::cout << "Starting Gaussian elimination backward substitution \n"; - } - //Solve Ux = y for x (Backward Substitution) - row = A_row_indices[A_row_indices.size() - 1]; - int jind; - double U_jj; - std::vector x(y); - for (int j = A_row_indices.size() - 1; j >= -1; --j) { - if (j != -1 && A_col_indices[j] < A_row_indices[j]) - continue; - - // If new row, we can apply the diagonal element of U - if (j == -1 || A_row_indices[j] != row) { - x[row] /= U_jj; - - if (j == -1) - break; - - row = A_row_indices[j]; - } - - if (A_row_indices[j] == A_col_indices[j]) { - U_jj = A_vals[j]; - jind = j; - continue; - } - - x[row] -= x[A_col_indices[j]] * A_vals[j]; - } - - return x; - -} /* ----- end of level::solve_gaussian_elimination ----- */ - -/*! - * \brief Factorization and solve on a specific RHS using an in-house sparse solver (deprecated) - * - * Factorization and solve on a specific RHS using an in-house sparse solver - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param f: the RHS - */ -std::vector level::solve_gaussian_elimination_fb_subst(std::vector A_row_indices, - std::vector A_col_indices, - std::vector A_vals, std::vector f) -{ - //std::cout << "Gaussian Elimination!\n"; - - int m_solution = f.size(); - std::vector x(m_solution, 0.0); //x is the solution vector, it has the same size than f, fill with zeros - - //Gaussian Elimination - //create matrices U and L - //U = A - std::vector U_row_indices(A_row_indices); - std::vector U_col_indices(A_col_indices); - std::vector U_vals(A_vals); - - //L = I - std::vector L_row_indices; //=[0,1,2,3,4...m-1] - std::vector L_col_indices; //=[0,1,2,3,4...m-1] - std::vector L_vals; //=[1,1,1,1...] m-times - for (int i = 0; i < m_solution; ++i) { - L_col_indices.push_back(i); - L_row_indices.push_back(i); - L_vals.push_back(1); - } - - //Gaussian Elimination - for (int k = 0; k < m_solution - 1; ++k) { //k=col index - for (int j = k + 1; j < m_solution; ++j) { //j=row index - - double U_jk = get_element(U_row_indices, U_col_indices, U_vals, j, k); //get the element (j,k) of U - - //if the U_jk is zero, we don't need to treat it and can just go on with the next element - if (U_jk != 0) { - double U_kk = get_element(U_row_indices, U_col_indices, U_vals, k, k); //get the element (k,k) of U - double L_jk = U_jk / U_kk; //step of GE - - //insert the new element L_jk into the matrix L - //as it has to be a new value, which is not yet there, just append new value to the end - L_vals.push_back(L_jk); - L_row_indices.push_back(j); - L_col_indices.push_back(k); - - for (int i = k; i < m_solution; ++i) { - - double U_ki = get_element(U_row_indices, U_col_indices, U_vals, k, i); //get the element (k,i) of U - - if (U_ki != 0) { //we can skip this part, if U_ki=0 - //U(j,i) = U(j,i) - L(j,k) * U(k,i) --> step of GE - double value = get_element(U_row_indices, U_col_indices, U_vals, j, i) - L_jk * U_ki; - set_element(U_row_indices, U_col_indices, U_vals, j, i, value); - } - } - } - } - } - - //std::cout << "backward substitution \n"; - //Forward-Backward-Substitution - - //Solve Ly=b for y (Forward Substitution) - std::vector y(m_solution, 0.0); - for (int j = 0; j < m_solution; ++j) { - - double L_jj = get_element(L_row_indices, L_col_indices, L_vals, j, j); //get the element (j,j) of U - double sum = 0; - - for (int k = 0; k < j; ++k) { - double L_jk = get_element(L_row_indices, L_col_indices, L_vals, j, k); //get the element (j,k) of U - sum += y[k] * L_jk; - } - y[j] = (f[j] - sum) / L_jj; - } - - //Solve Ux=y for x (Backward Substitution) - for (int j = m_solution - 1; j >= 0; --j) { - - double U_jj = get_element(U_row_indices, U_col_indices, U_vals, j, j); //get the element (j,j) of U - double sum = 0; - - for (int k = j; k < m_solution; ++k) { - double U_jk = get_element(U_row_indices, U_col_indices, U_vals, j, k); //get the element (j,k) of U - sum += x[k] * U_jk; - } - x[j] = (y[j] - sum) / U_jj; - } - - return x; -} /* ----- end of level::solve_gaussian_elimination_fb_subst ----- */ - -/*! - * \brief Finds value of entry (row, col) in the sparse matrix (deprecated) - * - * Finds value of entry (row, col) in the sparse matrix - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param row_index: row to find - * \param col_index: col to find - */ -double level::get_element(std::vector A_row_indices, std::vector A_col_indices, std::vector A_vals, - int row_index, int col_index) -{ - //get the element (i,j) of A - double A_ij = 0; - - //second version of code - int min = 0; - int max = A_vals.size(); - int count = log2(A_vals.size() / 10); - - //try to make the search region smaller, values in matrix are sorted by ascending rows - for (int z = 0; z < count; ++z) { - int middle = min + (max - min) / 2; - if (row_index > middle) { - min = middle; - } - else { - max = middle; - } - } - - for (int v = min; v < (int)A_vals.size(); ++v) { - if (A_row_indices[v] == row_index) { - if (A_col_indices[v] == col_index) { - A_ij = A_vals[v]; - break; //break the for loop when we found the value - } - } - } - - return A_ij; -} /* ----- end of level::get_element ----- */ - -/*! - * \brief Sets value of entry (row, col) in the sparse matrix (deprecated) - * - * Sets value of entry (row, col) in the sparse matrix - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param row_index: row to find - * \param col_index: col to find - */ -void level::set_element(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int row_index, int col_index, double value) -{ - - //set the element (i,j) of A to 'value' - //if there exists already an element, it is overwritten with 'value' - //if the element does not exist yet, just append it to the end - - int min = 0; - int max = A_vals.size(); - int count = log2(A_vals.size() / 10); - - //try to make the search region smaller, values in matrix are sorted by ascending rows - for (int z = 0; z < count; ++z) { - int middle = min + (max - min) / 2; - if (row_index > middle) { - min = middle; - } - else { - max = middle; - } - } - - int existing_element = 0; - for (int v = min; v < (int)A_vals.size(); ++v) { //check if there exists already an element - if (A_row_indices[v] == row_index) { - if (A_col_indices[v] == col_index) { - existing_element = 1; - if (value != 0) { //if value is not zero: set it - A_vals[v] = value; - } - else { //if value is zero: delete element from sparse matrix - A_vals.erase(A_vals.begin() + v); - A_row_indices.erase(A_row_indices.begin() + v); - A_col_indices.erase(A_col_indices.begin() + v); - } - break; //if we found the element, we can break the for-loop - } - } - } - if (existing_element == 0) { //if there exists no element yet, just append it - A_vals.push_back(value); - A_row_indices.push_back(row_index); - A_col_indices.push_back(col_index); - } -} /* ----- end of level::set_element ----- */ - -/*! - * \brief Solve diagonal system on a specific RHS - * - * Solve diagonal system on a specific RHS - * - * \param A_vals: vector of values for the diagonal matrix - * \param f: the RHS - */ -std::vector level::solve_diag(std::vector A_vals, std::vector f) -{ - int m = f.size(); - std::vector x(f); - // #pragma omp parallel for shared(x, A_vals) - for (int i = 0; i < m; i++) { - x[i] /= A_vals[i]; - } - return x; -} /* ----- end of level::solve_gaussian_elimination_fb_subst ----- */ - -/*! - * \brief Solve system for Circle smoother on a specific RHS - * - * Solve system for Circle smoother on a specific RHS - * The size of the system should be > 2 - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param f: the RHS - */ -std::vector level::solve_circle(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f) -{ - int m = f.size(); - std::vector x(f); - - /************************************** - * Forward substitution (Ly=f) - *************************************/ - // interior - for (int i = 0; i < m - 2; i++) { - int ind = 4 * i + 3; - x[i + 1] -= A_vals[ind] * x[i]; - int ind2 = 4 * (m - 3) + 3 + 3; - x[m - 1] -= A_vals[ind2 + i] * x[i]; - } - // Penultian line - int i = m - 2; - int ind2 = 4 * (m - 3) + 3 + 3; - x[m - 1] -= A_vals[ind2 + i] * x[i]; - - /************************************** - * Backward substitution (Ux=y) - *************************************/ - // Last line - int ind = 4 * (m - 3) + 3 + 3; - x[m - 1] /= A_vals[ind + m - 1]; - ind = 4 * (m - 3) + 3; - x[m - 2] -= A_vals[ind + 2] * x[m - 1]; - // Penultian line - i = m - 3; - ind = 4 * i + 3; - x[i + 1] /= A_vals[ind + 1]; - x[i] -= A_vals[ind - 2] * x[i + 1]; - - // Interior - for (int i = m - 4; i >= 0; i--) { - ind = 4 * i + 3; - x[i + 1] -= A_vals[ind + 3] * x[m - 1]; - x[i + 1] /= A_vals[ind + 1]; - x[i] -= A_vals[ind - 2] * x[i + 1]; - } - // first - x[0] -= A_vals[2] * x[m - 1]; - x[0] /= A_vals[0]; - - return x; -} /* ----- end of level::solve_gaussian_elimination_fb_subst ----- */ - -/*! - * \brief Solve system for Circle smoother on a specific RHS - * - * Solve system for Circle smoother on a specific RHS - * The size of the system should be > 2 - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param f: the RHS - */ -std::vector level::solve_radial(std::vector A_row_indices, std::vector A_col_indices, - std::vector A_vals, std::vector f) -{ - int i, ind, m = f.size(); - std::vector x(f); - - /************************************** - * Forward substitution (Ly=f) - *************************************/ - // interior - for (i = 0; i < m - 2; i++) { - ind = 3 * i + 2; - x[i + 1] -= A_vals[ind] * x[i]; - } - - /************************************** - * Backward substitution (Ux=y) - *************************************/ - ind = 3 * (m - 3) + 4; - x[m - 1] /= A_vals[ind]; - for (i = m - 3; i >= 0; i--) { - ind = 3 * i + 2; - x[i + 1] /= A_vals[ind + 1]; - x[i] -= A_vals[ind - 1] * x[i + 1]; - } - // first lines - x[0] /= A_vals[0]; - - return x; -} /* ----- end of level::solve_gaussian_elimination_fb_subst ----- */ - -/*! - * \brief Factorization of A using an in-house sparse solver - * - * Factorization of A using an in-house sparse solver - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param m_solution: size of the solutions in MUMPS - */ -void level::facto_radial(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int m) - -{ - int i, ind; - - // Interior - for (i = 0; i < m - 2; i++) { - ind = 3 * i + 2; - A_vals[ind] /= A_vals[ind - 2]; // L - A_vals[ind + 1] -= A_vals[ind - 1] * A_vals[ind]; // U - } -} /* ----- end of level::facto_gaussian_elimination ----- */ -/*! - * \brief Factorization of A using an in-house sparse solver - * - * Factorization of A using an in-house sparse solver - * - * \param A_row_indices: vector of row indices for the matrix - * \param A_col_indices: vector of column indices for the matrix - * \param A_vals: vector of valus for the matrix - * \param m_solution: size of the solutions in MUMPS - */ -void level::facto_circle(std::vector& A_row_indices, std::vector& A_col_indices, std::vector& A_vals, - int m) - -{ - int i, ind, ind2; - - // First line - ind = 3; - A_vals[ind] /= A_vals[ind - 3]; // L - A_vals[ind + 1] -= A_vals[ind - 2] * A_vals[ind]; // U (diag) - A_vals[ind + 3] -= A_vals[ind - 1] * A_vals[ind]; // U (last col=fill-in) - // Update last line - ind2 = 4 * (m - 3) + 3 + 3; - A_vals[ind2] /= A_vals[ind - 3]; // L - A_vals[ind2 + 1] -= A_vals[ind - 2] * A_vals[ind2]; // L (last line=fill-in) - A_vals[ind2 + m - 1] -= A_vals[ind - 1] * A_vals[ind2]; // U (diag) - // Interior - for (i = 1; i < m - 3; i++) { - ind = 4 * i + 3; - A_vals[ind] /= A_vals[ind - 3]; // L - A_vals[ind + 1] -= A_vals[ind - 2] * A_vals[ind]; // U (diag) - A_vals[ind + 3] -= A_vals[ind - 1] * A_vals[ind]; // U (last col=fill-in) - // Update last line - ind2 = 4 * (m - 3) + 3 + 3; - A_vals[ind2 + i] /= A_vals[ind - 3]; // L - A_vals[ind2 + i + 1] -= A_vals[ind - 2] * A_vals[ind2 + i]; // L (last line=fill-in) - A_vals[ind2 + m - 1] -= A_vals[ind - 1] * A_vals[ind2 + i]; // U (diag) - } - // Penultian line - i = (m - 3); - ind = 4 * i + 3; - A_vals[ind] /= A_vals[ind - 3]; // L - A_vals[ind + 1] -= A_vals[ind - 2] * A_vals[ind]; // U (diag) - A_vals[ind + 2] -= A_vals[ind - 1] * A_vals[ind]; // U (last col) - // Update last line - ind2 = 4 * (m - 3) + 3 + 3; - A_vals[ind2 + i] /= A_vals[ind - 3]; // L - A_vals[ind2 + i + 1] -= A_vals[ind - 2] * A_vals[ind2 + i]; // U (diag) - A_vals[ind2 + m - 1] -= A_vals[ind - 1] * A_vals[ind2 + i]; // U (last col) - // Last line - A_vals[ind2 + m - 2] /= A_vals[ind + 1]; // L - A_vals[ind2 + m - 1] -= A_vals[ind + 2] * A_vals[ind2 + m - 2]; // L -} /* ----- end of level::facto_gaussian_elimination ----- */ - -/*! - * \brief Initialize the LU factors for circle - * - * Initialize the LU factors for the circle smoother based on the matrix - * while taking into account the fill-in. - * - * \param ij: block number for the current smoother - * \param smoother: the current smoother - * - */ -void level::fill_in_circle(int ij, int smoother) -{ - int ind, ind2; - int msc = m_sc[smoother]; - int size_LU = 3 * msc + 2 * (msc - 3); - // first line - A_Zebra_r_LU_row[smoother][ij] = std::vector(size_LU); - A_Zebra_c_LU_row[smoother][ij] = std::vector(size_LU); - A_Zebra_v_LU_row[smoother][ij] = std::vector(size_LU); - A_Zebra_r_LU_row[smoother][ij][0] = A_Zebra_r_row[smoother][ij][1]; - A_Zebra_c_LU_row[smoother][ij][0] = A_Zebra_c_row[smoother][ij][1]; - A_Zebra_v_LU_row[smoother][ij][0] = A_Zebra_v_row[smoother][ij][1]; - A_Zebra_r_LU_row[smoother][ij][1] = A_Zebra_r_row[smoother][ij][2]; - A_Zebra_c_LU_row[smoother][ij][1] = A_Zebra_c_row[smoother][ij][2]; - A_Zebra_v_LU_row[smoother][ij][1] = A_Zebra_v_row[smoother][ij][2]; - A_Zebra_r_LU_row[smoother][ij][2] = A_Zebra_r_row[smoother][ij][0]; - A_Zebra_c_LU_row[smoother][ij][2] = A_Zebra_c_row[smoother][ij][0]; - A_Zebra_v_LU_row[smoother][ij][2] = A_Zebra_v_row[smoother][ij][0]; - // interior - for (int i = 0; i < msc - 2; i++) { - ind = 3 * i + 3; - ind2 = 4 * i + 3; - - A_Zebra_r_LU_row[smoother][ij][ind2] = A_Zebra_r_row[smoother][ij][ind]; - A_Zebra_r_LU_row[smoother][ij][ind2 + 1] = A_Zebra_r_row[smoother][ij][ind + 1]; - A_Zebra_r_LU_row[smoother][ij][ind2 + 2] = A_Zebra_r_row[smoother][ij][ind + 2]; - A_Zebra_r_LU_row[smoother][ij][ind2 + 3] = A_Zebra_r_row[smoother][ij][ind + 2]; - A_Zebra_c_LU_row[smoother][ij][ind2] = A_Zebra_c_row[smoother][ij][ind]; - A_Zebra_c_LU_row[smoother][ij][ind2 + 1] = A_Zebra_c_row[smoother][ij][ind + 1]; - A_Zebra_c_LU_row[smoother][ij][ind2 + 2] = A_Zebra_c_row[smoother][ij][ind + 2]; - A_Zebra_c_LU_row[smoother][ij][ind2 + 3] = msc - 1; - A_Zebra_v_LU_row[smoother][ij][ind2] = A_Zebra_v_row[smoother][ij][ind]; - A_Zebra_v_LU_row[smoother][ij][ind2 + 1] = A_Zebra_v_row[smoother][ij][ind + 1]; - A_Zebra_v_LU_row[smoother][ij][ind2 + 2] = A_Zebra_v_row[smoother][ij][ind + 2]; - A_Zebra_v_LU_row[smoother][ij][ind2 + 3] = 0; - } - // Penultian line - ind = 3 * (msc - 3) + 3; - ind2 = 4 * (msc - 3) + 3; - A_Zebra_r_LU_row[smoother][ij][ind2] = A_Zebra_r_row[smoother][ij][ind]; - A_Zebra_r_LU_row[smoother][ij][ind2 + 1] = A_Zebra_r_row[smoother][ij][ind + 1]; - A_Zebra_r_LU_row[smoother][ij][ind2 + 2] = A_Zebra_r_row[smoother][ij][ind + 2]; - A_Zebra_c_LU_row[smoother][ij][ind2] = A_Zebra_c_row[smoother][ij][ind]; - A_Zebra_c_LU_row[smoother][ij][ind2 + 1] = A_Zebra_c_row[smoother][ij][ind + 1]; - A_Zebra_c_LU_row[smoother][ij][ind2 + 2] = A_Zebra_c_row[smoother][ij][ind + 2]; - A_Zebra_v_LU_row[smoother][ij][ind2] = A_Zebra_v_row[smoother][ij][ind]; - A_Zebra_v_LU_row[smoother][ij][ind2 + 1] = A_Zebra_v_row[smoother][ij][ind + 1]; - A_Zebra_v_LU_row[smoother][ij][ind2 + 2] = A_Zebra_v_row[smoother][ij][ind + 2]; - // last line - ind = 3 * (msc - 3) + 3 + 3; - ind2 = 4 * (msc - 3) + 3 + 3; - A_Zebra_r_LU_row[smoother][ij][ind2] = A_Zebra_r_row[smoother][ij][ind + 2]; - A_Zebra_c_LU_row[smoother][ij][ind2] = A_Zebra_c_row[smoother][ij][ind + 2]; - A_Zebra_v_LU_row[smoother][ij][ind2] = A_Zebra_v_row[smoother][ij][ind + 2]; - for (int i = 1; i < msc - 2; i++) { - A_Zebra_r_LU_row[smoother][ij][ind2 + i] = msc - 1; - A_Zebra_c_LU_row[smoother][ij][ind2 + i] = i; - A_Zebra_v_LU_row[smoother][ij][ind2 + i] = 0; - } - A_Zebra_r_LU_row[smoother][ij][ind2 + msc - 2] = A_Zebra_r_row[smoother][ij][ind]; - A_Zebra_c_LU_row[smoother][ij][ind2 + msc - 2] = A_Zebra_c_row[smoother][ij][ind]; - A_Zebra_v_LU_row[smoother][ij][ind2 + msc - 2] = A_Zebra_v_row[smoother][ij][ind]; - A_Zebra_r_LU_row[smoother][ij][ind2 + msc - 1] = A_Zebra_r_row[smoother][ij][ind + 1]; - A_Zebra_c_LU_row[smoother][ij][ind2 + msc - 1] = A_Zebra_c_row[smoother][ij][ind + 1]; - A_Zebra_v_LU_row[smoother][ij][ind2 + msc - 1] = A_Zebra_v_row[smoother][ij][ind + 1]; -} /* ----- end of level::fill_in_circle ----- */ diff --git a/src/gmgpolar.cpp b/src/gmgpolar.cpp deleted file mode 100644 index dea7adc1..00000000 --- a/src/gmgpolar.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file gmgpolar.cpp - * \brief Implementation of the class gmgpolar - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gmgpolar.h" - -/*! - * \brief Default Constructor of gmgpolar class - * - * Default constructor of the gmgpolar class, sets default values for - * attributes. - * - */ -gmgpolar::gmgpolar() -{ - reset_timers(); -} /* ----- end of constructor gmgpolar:gmgpolar ----- */ - -/*! - * \brief Default Destructor of gmgpolar class - * - * Default destructor of the gmgpolar class. - * - */ -gmgpolar::~gmgpolar() -{ - for (int i = 0; i < levels_orig; i++) { - delete v_level[i]; - } -} /* ----- end of destructor gmgpolar::~gmgpolar ----- */ - -/*! - * \brief Sets execution times to 0 - * - * Sets execution times to 0. - * - */ -void gmgpolar::reset_timers() -{ - t_setup = 0; - t_build = 0; - t_facto_Ac = 0; - t_build_P = 0; - t_build_Asc = 0; - t_facto_Asc = 0; - t_total_mgcycle = 0; - t_smoothing = 0; - t_residual = 0; - t_restriction = 0; - t_Ac = 0; - t_prolongation = 0; - t_applyA = 0; - t_fine_residual = 0; - t_error = 0; -} /* ----- end of gmgpolar::reset_timers ----- */ diff --git a/src/gyro.cpp b/src/gyro.cpp deleted file mode 100644 index d70ec556..00000000 --- a/src/gyro.cpp +++ /dev/null @@ -1,1586 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file gyro.cpp - * \brief Header for the class gyro - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gyro.h" -#include "CartesianR2GyroSonnendruckerCircular.h" -#include "CartesianR2GyroSonnendruckerShafranov.h" -#include "CartesianR2GyroSonnendruckerTriangular.h" -#include "PolarR6GyroSonnendruckerCircular.h" -#include "PolarR6GyroSonnendruckerShafranov.h" -#include "PolarR6GyroSonnendruckerTriangular.h" -#include "CartesianR6GyroSonnendruckerCircular.h" -#include "CartesianR6GyroSonnendruckerShafranov.h" -#include "CartesianR6GyroSonnendruckerTriangular.h" -#include "CartesianR2GyroZoniCircular.h" -#include "CartesianR2GyroZoniShafranov.h" -#include "CartesianR2GyroZoniTriangular.h" -#include "PolarR6GyroZoniCircular.h" -#include "PolarR6GyroZoniShafranov.h" -#include "PolarR6GyroZoniTriangular.h" -#include "CartesianR6GyroZoniCircular.h" -#include "CartesianR6GyroZoniShafranov.h" -#include "CartesianR6GyroZoniTriangular.h" -#include "CartesianR2GyroZoniShiftedCircular.h" -#include "CartesianR2GyroZoniShiftedShafranov.h" -#include "CartesianR2GyroZoniShiftedTriangular.h" -#include "PolarR6GyroZoniShiftedCircular.h" -#include "PolarR6GyroZoniShiftedShafranov.h" -#include "PolarR6GyroZoniShiftedTriangular.h" -#include "PolarR6GyroZoniShiftedCulham.h" -#include "CartesianR6GyroZoniShiftedCircular.h" -#include "CartesianR6GyroZoniShiftedShafranov.h" -#include "CartesianR6GyroZoniShiftedTriangular.h" -#include "CartesianR2SonnendruckerCircular.h" -#include "CartesianR2SonnendruckerShafranov.h" -#include "CartesianR2SonnendruckerTriangular.h" -#include "PolarR6SonnendruckerCircular.h" -#include "PolarR6SonnendruckerShafranov.h" -#include "PolarR6SonnendruckerTriangular.h" -#include "CartesianR6SonnendruckerCircular.h" -#include "CartesianR6SonnendruckerShafranov.h" -#include "CartesianR6SonnendruckerTriangular.h" -#include "CartesianR2ZoniCircular.h" -#include "CartesianR2ZoniShafranov.h" -#include "CartesianR2ZoniTriangular.h" -#include "PolarR6ZoniCircular.h" -#include "PolarR6ZoniShafranov.h" -#include "PolarR6ZoniTriangular.h" -#include "CartesianR6ZoniCircular.h" -#include "CartesianR6ZoniShafranov.h" -#include "CartesianR6ZoniTriangular.h" -#include "CartesianR2ZoniShiftedCircular.h" -#include "CartesianR2ZoniShiftedShafranov.h" -#include "CartesianR2ZoniShiftedTriangular.h" -#include "PolarR6ZoniShiftedCircular.h" -#include "PolarR6ZoniShiftedShafranov.h" -#include "PolarR6ZoniShiftedTriangular.h" -#include "CartesianR6ZoniShiftedCircular.h" -#include "CartesianR6ZoniShiftedShafranov.h" -#include "CartesianR6ZoniShiftedTriangular.h" -#include "CartesianR2PoissonCircular.h" -#include "CartesianR2PoissonShafranov.h" -#include "CartesianR2PoissonTriangular.h" -#include "PolarR6PoissonCircular.h" -#include "PolarR6PoissonShafranov.h" -#include "PolarR6PoissonTriangular.h" -#include "CartesianR6PoissonCircular.h" -#include "CartesianR6PoissonShafranov.h" -#include "CartesianR6PoissonTriangular.h" -#include "RefinedGyroZoniShiftedCircular.h" -#include "RefinedGyroZoniShiftedShafranov.h" -#include "RefinedGyroZoniShiftedTriangular.h" -#include "RefinedGyroZoniShiftedCulham.h" - -namespace gyro -{ -/******************************************************************************* - * Attributes - ******************************************************************************/ -/*************************************************************************** - * Controls and Informations - **************************************************************************/ -/* controls initialization */ -std::vector icntl(40, 0); -std::vector dcntl(30, 0); - -/* infos initialization */ -std::vector info(10, 0); -std::vector dinfo(10, 0); -std::unique_ptr functions; - -std::string f_grid_r = ""; -std::string f_grid_theta = ""; -std::string f_sol_in = ""; -std::string f_sol_out = ""; -} // namespace gyro - -/******************************************************************************* - * Methods - ******************************************************************************/ -/*************************************************************************** - * Parameters - **************************************************************************/ -/*! - * \brief Initialize the chosen parameters - * - * Initialize the chosen parameters - * - */ -void gyro::init_params() -{ - icntl[Param::optimized] = 1; - icntl[Param::matrix_free] = 1; - icntl[Param::debug] = 0; - icntl[Param::nr_exp] = 3; - icntl[Param::ntheta_exp] = 3; - icntl[Param::fac_ani] = 0; // 0 or 1 - icntl[Param::v1] = 1; - icntl[Param::v2] = 1; - icntl[Param::cycle] = 1; // 1 or 2 - icntl[Param::mod_pk] = 0; // 0 or 1 - icntl[Param::compute_rho] = 0; // 0 or 1 - icntl[Param::level] = -1; - icntl[Param::plotit] = 1; - icntl[Param::solveit] = 1; - icntl[Param::maxiter] = 150; - icntl[Param::periodic] = 1; - icntl[Param::origin_NOT_coarse] = 0; - icntl[Param::theta_aniso] = 0; - icntl[Param::smoother] = 3; // originally 4 intended (optimized) - icntl[Param::discr] = 3; - icntl[Param::extrapolation] = 2; - icntl[Param::DirBC_Interior] = 0; // 0 or 1 - icntl[Param::paraview] = 0; - icntl[Param::divideBy2] = 0; - icntl[Param::prob] = 5; - icntl[Param::alpha_coeff] = 0; - icntl[Param::beta_coeff] = 0; - icntl[Param::verbose] = 2; - icntl[Param::openmp] = 1; - icntl[Param::res_norm] = 3; - icntl[Param::write_radii_angles] = 0; - icntl[Param::check_error] = 0; - - dcntl[Param::r0_DB] = -1e6; - dcntl[Param::R0] = 0.1; - dcntl[Param::R] = 1.3; - dcntl[Param::THETA0] = 0.1; - dcntl[Param::THETA] = 1.3; - dcntl[Param::kappa_eps] = 0; - dcntl[Param::delta_e] = 0; - dcntl[Param::tol_bound_check] = 1e-8; - dcntl[Param::rel_red_conv] = 1e-8; - dcntl[Param::t_coeff] = 0; - dcntl[Param::t_arr_art_att] = 0; - dcntl[Param::t_sol] = 0; - dcntl[Param::t_detDFinv] = 0; - dcntl[Param::t_trafo] = 0; -} /* ----- end of gyro::init_params ----- */ - -/*! - * \brief Shows the chosen parameters - * - * Shows the chosen parameters - * - */ -void gyro::show_params() -{ - std::cout << "optimized: " << icntl[Param::optimized] << "\n"; - std::cout << "matrix_free: " << icntl[Param::matrix_free] << "\n"; - std::cout << "debug: " << icntl[Param::debug] << "\n"; - std::cout << "nr_exp: " << icntl[Param::nr_exp] << "\n"; - std::cout << "ntheta_exp: " << icntl[Param::ntheta_exp] << "\n"; - std::cout << "fac_ani: " << icntl[Param::fac_ani] << "\n"; - std::cout << "theta_aniso: " << icntl[Param::theta_aniso] << "\n"; - std::cout << "v1: " << icntl[Param::v1] << "\n"; - std::cout << "v2: " << icntl[Param::v2] << "\n"; - std::cout << "cycle: " << icntl[Param::cycle] << "\n"; - std::cout << "mod_pk: " << icntl[Param::mod_pk] << "\n"; - std::cout << "compute_rho: " << icntl[Param::compute_rho] << "\n"; - std::cout << "level: " << icntl[Param::level] << "\n"; - std::cout << "plotit: " << icntl[Param::plotit] << "\n"; - std::cout << "solveit: " << icntl[Param::solveit] << "\n"; - std::cout << "maxiter: " << icntl[Param::maxiter] << "\n"; - std::cout << "periodic: " << icntl[Param::periodic] << "\n"; - std::cout << "origin_NOT_coarse: " << icntl[Param::origin_NOT_coarse] << "\n"; - std::cout << "smoother: " << icntl[Param::smoother] << "\n"; - std::cout << "discr: " << icntl[Param::discr] << "\n"; - std::cout << "extrapolation: " << icntl[Param::extrapolation] << "\n"; - std::cout << "DirBC_Interior: " << icntl[Param::DirBC_Interior] << "\n"; - std::cout << "paraview: " << icntl[Param::paraview] << "\n"; - std::cout << "divideBy2: " << icntl[Param::divideBy2] << "\n"; - std::cout << "prob: " << icntl[Param::prob] << "\n"; - std::cout << "alpha_coeff: " << icntl[Param::alpha_coeff] << "\n"; - std::cout << "beta_coeff: " << icntl[Param::beta_coeff] << "\n"; - std::cout << "verbose: " << icntl[Param::verbose] << "\n"; - std::cout << "openmp: " << icntl[Param::openmp] << "\n"; - std::cout << "res_norm: " << icntl[Param::res_norm] << "\n"; - std::cout << "write_radii_angles: " << icntl[Param::write_radii_angles] << "\n"; - std::cout << "check_error: " << icntl[Param::check_error] << "\n"; - - std::cout << "R0: " << dcntl[Param::R0] << "\n"; - std::cout << "R: " << dcntl[Param::R] << "\n"; - std::cout << "kappa_eps: " << dcntl[Param::kappa_eps] << "\n"; - std::cout << "delta_e: " << dcntl[Param::delta_e] << "\n"; - std::cout << "tol_bound_check: " << dcntl[Param::tol_bound_check] << "\n"; - std::cout << "rel_red_conv: " << dcntl[Param::rel_red_conv] << "\n"; - std::cout << "\n"; -} /* ----- end of gyro::show_params ----- */ - -/*************************************************************************** - * Boundary and solution - **************************************************************************/ -/************************ - * Single - ************************/ -/*! - * \brief Computes the distance of a node (r, theta) to the Dirichlet boundary. - * The function assumes a boundary given by r_0=Param::r0_DB and R=Param::R. - * - * Attention: As we compute (r-r_0)*(r-R), the output of this function is highly dependent on r_0. - * If r_0 is set "very close" to zero, roundoff errors can appear for function values on the innermost circles. - * However, as dcntl[Param::r0_DB] is advised to be chosen small if icntl[Param::DirBC_Interior]=0 is set, - * this function should be handled with care. Modestly small values like 1e-5 or 1e-8 should not create a problem. - * - * For more details on the Across-The-Origin heuristic, which is implemented with icntl[Param::DirBC_Interior]=0, - * see Kühn, Kruse, Rüde, Journal of Scientific Computing, 91 (28), (2022). - * - * \param r_i: the r coordinate of the node - * \param theta_j: the theta coordinate of the node - * \param verbose: verbose level for debug - * - * \return the distance - * - */ -double gyro::distBoundary(double r_i, double theta_j, int verbose) -{ - // // alt: rectangle/periodic - // double r_i, theta_j; - // gyro::trafo_back(r_i, theta_j, x, y, 0); - // x = r_i; - // y = theta_j; - - double boundDefDim1 = fabs(r_i - dcntl[Param::r0_DB]) * fabs(r_i - dcntl[Param::R]); - double boundDefDim2 = 1; - - if (verbose > 5) { - std::cout << "DISTBOUNDARY (" << r_i << ", " << theta_j << "): " << boundDefDim1 * boundDefDim2 - << " (boundDefDim1: " << boundDefDim1 << ", boundDefDim2: " << boundDefDim2 << ")\n"; - } - return boundDefDim1 * boundDefDim2; -} /* ----- end of gyro::distBoundary ----- */ - -/*! - * \brief Sign function - * - * Sign function returns -1 (< 0) or 1 (>= 0) - * - * \param n: number which sign is to compute - * - * \return the sign - * - */ -int gyro::sign(double n) -{ - return (n < 0) ? -1 : 1; -} - -/*! - * \brief Evaluates the solution - * - * Evaluates the solution from the polar coordinates - * - * \param r_i: the r coordinate of the node - * \param theta_j: the theta coordinate of the node - * \param verbose: verbose level for debug - * - * \return the solution value - * - */ -double gyro::def_solution_rt(double r_i, double theta_j, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double sol = functions->phi_exact(r_i, theta_j, kappa_eps, delta_e, Rmax); - - dcntl[Param::t_sol] += TOC; - - if (verbose > 5) { - std::cout << "SOL (" << r_i << ", " << theta_j << "): " << sol << "\n"; - } - return sol; -} /* ----- end of gyro::eval_def_solution_vec ----- */ - -/************************ - * Vector - ************************/ -/*! - * \brief Evaluates the solution - * - * Evaluates the solution from the r coordinate on all theta positions - * - * \param r_i: the r coordinate of the node - * \param theta: vector theta (0, ntheta_int) - * \param sin_theta: sines of theta - * \param cos_theta: cosines of theta - * \param ntheta: number of values in theta - * \param verbose: verbose level for debug - * - * \return the solution vector - */ -std::vector gyro::def_solution_rt(double r_i, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - // double R0 = dcntl[Param::R0]; - - std::vector sol(ntheta); - functions->phi_exact(r_i, theta, kappa_eps, delta_e, Rmax, sol, sin_theta, cos_theta); - - dcntl[Param::t_sol] += TOC; - - if (verbose > 5) { - for (int i = 0; i < ntheta; i++) - std::cout << "SOL (" << r_i << ", " << theta[i] << "): " << sol[i] << "\n"; - } - return sol; -} /* ----- end of gyro::eval_def_solution_vec ----- */ - -/*************************************************************************** -* Diffusivity and operator -**************************************************************************/ -/*! - * \brief Diffusivity coefficient - * - * Computes the diffusivity coefficient depending on the radius r - * - for prob 3 or 5: alpha(r)=(2.0/(2.6+3.14)) * (1.3 + atan((1-1.3*r/Rmax) / 0.09)) - * - else: 1 - * - * \param r: the r coordinate - * \param verbose: verbose level for debug - * - * \return the coefficient - * - */ -double gyro::coeff_alpha(double r, int verbose) -{ - double t; - TIC; - - double Rmax = dcntl[Param::R]; - - double coeff_a = functions->coeffs1(r, Rmax); - - dcntl[Param::t_coeff] += TOC; - - if (verbose > 5) { - std::cout << "COEFF_A (" << r << "): " << coeff_a << "\n"; - } - return coeff_a; -} /* ----- end of level::coeff ----- */ - -/*! - * \brief Beta coefficient - * - * \param r: the r coordinate - * \param verbose: verbose level for debug - * - * \return the coefficient - * - */ -double gyro::coeff_beta(double r, int verbose) -{ - double t; - TIC; - - double Rmax = dcntl[Param::R]; - - double coeff_b = functions->coeffs2(r, Rmax); - - dcntl[Param::t_coeff] += TOC; - - if (verbose > 5) { - std::cout << "COEFF_B (" << r << "): " << coeff_b << "\n"; - } - return coeff_b; -} /* ----- end of level::coeff ----- */ - -/*! - * \brief Diffusivity coefficient - * - * Computes the diffusivity coefficient depending on the radius r - * - for prob 3 or 5: alpha(r)=(2.0/(2.6+3.14)) * (1.3 + atan((1-1.3*r/Rmax) / 0.09)) - * - else: 1 - * - * \param r: the r coordinate - * \param verbose: verbose level for debug - * - * \return the coefficient - * - */ -std::vector gyro::coeff_alpha(std::vector r, int verbose) -{ - double t; - TIC; - - double Rmax = dcntl[Param::R]; - - std::vector coeff_a(r.size()); - functions->coeffs1(r, Rmax, coeff_a); - - dcntl[Param::t_coeff] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(r, "r"); - disp(coeff_a, "coeff_a"); - } - return coeff_a; -} /* ----- end of level::coeff ----- */ - -/*! - * \brief Beta coefficient - * - * \param r: the r coordinate - * \param verbose: verbose level for debug - * - * \return the coefficient - * - */ -std::vector gyro::coeff_beta(std::vector r, int verbose) -{ - double t; - TIC; - - double Rmax = dcntl[Param::R]; - - std::vector coeff_b(r.size()); - functions->coeffs2(r, Rmax, coeff_b); - - dcntl[Param::t_coeff] += TOC; - if (gyro::icntl[Param::verbose] > 5) { - disp(r, "r"); - disp(coeff_b, "coeff_b"); - } - return coeff_b; -} /* ----- end of level::coeff_beta ----- */ - -/*! - * \brief detDFinv/arr/art/att/arr_att_art (single) - * - * Computes values from the polar coordinates - * - computing the determinant of the derivative of F_inverse (det(DFinv)) - * - computing the coefficient a_r,r - * - computing the coefficient a_r,theta - * - computing the coefficient a_theta,theta - * - computing all 3 coefficients at once to reduce flops - * - * \param r: the r coordinate of the node - * \param theta: the theta coordinate of the node - * \param verbose: verbose level for debug - * - * \return the computed value - * - */ -double gyro::detDFinv(double r, double theta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double Jrr = functions->J_rr(r, theta, kappa_eps, delta_e, Rmax); - double Jrt = functions->J_rt(r, theta, kappa_eps, delta_e, Rmax); - double Jtr = functions->J_tr(r, theta, kappa_eps, delta_e, Rmax); - double Jtt = functions->J_tt(r, theta, kappa_eps, delta_e, Rmax); - double detDFinv_r = Jrr * Jtt - Jrt * Jtr; - - dcntl[Param::t_detDFinv] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - std::cout << "Value of detDFinv (" << r << ", " << theta << "): " << detDFinv_r << "\n"; - } - return detDFinv_r; -} /* ----- end of level::detDFinv ----- */ - -double gyro::arr(double r, double theta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double detDFinv_r = detDFinv(r, theta, verbose); - double coeff_r = coeff_alpha(r, verbose); - double Jrt = functions->J_rt(r, theta, kappa_eps, delta_e, Rmax); - double Jtt = functions->J_tt(r, theta, kappa_eps, delta_e, Rmax); - double arr_r = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff_r / fabs(detDFinv_r); - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - std::cout << "Value of arr (" << r << ", " << theta << "): " << arr_r << "\n"; - } - return arr_r; -} /* ----- end of level::arr ----- */ - -double gyro::art(double r, double theta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double detDFinv_r = detDFinv(r, theta, verbose); - double coeff_r = coeff_alpha(r, verbose); - double Jrr = functions->J_rr(r, theta, kappa_eps, delta_e, Rmax); - double Jrt = functions->J_rt(r, theta, kappa_eps, delta_e, Rmax); - double Jtr = functions->J_tr(r, theta, kappa_eps, delta_e, Rmax); - double Jtt = functions->J_tt(r, theta, kappa_eps, delta_e, Rmax); - double art_r = -0.25 * (Jtt * Jtr + Jrt * Jrr) * coeff_r / fabs(detDFinv_r); - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - std::cout << "Value of art (" << r << ", " << theta << "): " << art_r << "\n"; - } - return art_r; -} /* ----- end of level::art ----- */ - -double gyro::att(double r, double theta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double detDFinv_r = detDFinv(r, theta, verbose); - double coeff_r = coeff_alpha(r, verbose); - double Jrr = functions->J_rr(r, theta, kappa_eps, delta_e, Rmax); - double Jtr = functions->J_tr(r, theta, kappa_eps, delta_e, Rmax); - double att_r = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff_r / fabs(detDFinv_r); - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - std::cout << "Value of att (" << r << ", " << theta << "): " << att_r << "\n"; - } - return att_r; -} /* ----- end of level::att ----- */ - -void gyro::arr_att_art(double r, double theta, double& arr, double& att, double& art, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - double detDFinv_r = detDFinv(r, theta, verbose); - double coeff_r = coeff_alpha(r, verbose); - double Jrr = functions->J_rr(r, theta, kappa_eps, delta_e, Rmax); - double Jrt = functions->J_rt(r, theta, kappa_eps, delta_e, Rmax); - double Jtr = functions->J_tr(r, theta, kappa_eps, delta_e, Rmax); - double Jtt = functions->J_tt(r, theta, kappa_eps, delta_e, Rmax); - double coeff = coeff_r / fabs(detDFinv_r); - arr = 0.5 * (Jtt * Jtt + Jrt * Jrt) * coeff; - art = -0.25 * (Jtt * Jtr + Jrt * Jrr) * coeff; - att = 0.5 * (Jtr * Jtr + Jrr * Jrr) * coeff; - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - std::cout << "Value of arr (" << r << ", " << theta << "): " << arr << "\n"; - std::cout << "Value of att (" << r << ", " << theta << "): " << att << "\n"; - std::cout << "Value of art (" << r << ", " << theta << "): " << art << "\n"; - } -} /* ----- end of level::arr_att_art ----- */ - -/*! - * \brief detDFinv/arr/art/att/arr_att_art (vector) - * - * Computes values from the r coordinate on all theta positions - * - computing the determinant of the derivative of F_inverse (det(DFinv)) - * - computing the coefficient a_r,r - * - computing the coefficient a_r,theta - * - computing the coefficient a_theta,theta - * - computing all 3 coefficients at once to reduce flops - * - * \param r: the r coordinate of the node - * \param theta: the theta coordinate of the node - * \param verbose: verbose level for debug - * - * \return the computed vector - * - */ -std::vector gyro::detDFinv(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::vector detDFinv_r(ntheta); - std::vector Jrr(ntheta); - std::vector Jrt(ntheta); - std::vector Jtr(ntheta); - std::vector Jtt(ntheta); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr, sin_theta, cos_theta); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt, sin_theta, cos_theta); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr, sin_theta, cos_theta); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt, sin_theta, cos_theta); - for (int i = 0; i < ntheta; i++) { - detDFinv_r[i] = Jrr[i] * Jtt[i] - Jrt[i] * Jtr[i]; - } - - dcntl[Param::t_detDFinv] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(theta, "theta"); - disp(cos_theta, "cos_theta"); - disp(detDFinv_r, "detDFinv_r"); - } - return detDFinv_r; -} /* ----- end of level::detDFinv ----- */ - -/*! - * \brief detDFinv/arr/art/att/arr_att_art (vector) - * - * Computes values from the r coordinate on all theta positions - * - computing the determinant of the derivative of F_inverse (det(DFinv)) - * - computing the coefficient a_r,r - * - computing the coefficient a_r,theta - * - computing the coefficient a_theta,theta - * - computing all 3 coefficients at once to reduce flops - * - * \param r: the r coordinate of the node - * \param theta: the theta coordinate of the node - * \param verbose: verbose level for debug - * - * \return the computed vector - * - */ -std::vector gyro::detDFinv(std::vector r, double theta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::size_t nr = r.size(); - std::vector detDFinv_r(nr); - std::vector Jrr(nr); - std::vector Jrt(nr); - std::vector Jtr(nr); - std::vector Jtt(nr); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt); - for (std::size_t i = 0; i < r.size(); i++) { - detDFinv_r[i] = Jrr[i] * Jtt[i] - Jrt[i] * Jtr[i]; - } - - dcntl[Param::t_detDFinv] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(r, "r"); - disp(detDFinv_r, "detDFinv_r"); - } - return detDFinv_r; -} /* ----- end of level::detDFinv ----- */ - -std::vector gyro::arr(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::vector arr_r(ntheta); - std::vector detDFinv_r = detDFinv(r, theta, sin_theta, cos_theta, ntheta, verbose); - std::vector Jrt(ntheta); - std::vector Jtt(ntheta); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt, sin_theta, cos_theta); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt, sin_theta, cos_theta); - double coeff_r = coeff_alpha(r, verbose); - ; - for (int i = 0; i < ntheta; i++) { - arr_r[i] = 0.5 * (Jtt[i] * Jtt[i] + Jrt[i] * Jrt[i]) * coeff_r / fabs(detDFinv_r[i]); - } - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(theta, "theta"); - disp(sin_theta, "sin_theta"); - disp(cos_theta, "cos_theta"); - disp(arr_r, "arr_r"); - } - return arr_r; -} /* ----- end of level::arr ----- */ -std::vector gyro::art(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::vector art_r(ntheta); - std::vector detDFinv_r = detDFinv(r, theta, sin_theta, cos_theta, ntheta, verbose); - std::vector Jrr(ntheta); - std::vector Jrt(ntheta); - std::vector Jtr(ntheta); - std::vector Jtt(ntheta); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr, sin_theta, cos_theta); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt, sin_theta, cos_theta); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr, sin_theta, cos_theta); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt, sin_theta, cos_theta); - double coeff_r = coeff_alpha(r, verbose); - ; - for (int i = 0; i < ntheta; i++) { - art_r[i] = -0.25 * (Jtt[i] * Jtr[i] + Jrt[i] * Jrr[i]) * coeff_r / fabs(detDFinv_r[i]); - } - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(theta, "theta"); - disp(sin_theta, "sin_theta"); - disp(cos_theta, "cos_theta"); - disp(art_r, "art_r"); - } - return art_r; -} /* ----- end of level::art ----- */ -std::vector gyro::att(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - std::vector att_r(ntheta); - std::vector detDFinv_r = detDFinv(r, theta, sin_theta, cos_theta, ntheta, verbose); - std::vector Jrr(ntheta); - std::vector Jrt(ntheta); - std::vector Jtr(ntheta); - std::vector Jtt(ntheta); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr, sin_theta, cos_theta); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr, sin_theta, cos_theta); - double coeff_r = coeff_alpha(r, verbose); - ; - for (int i = 0; i < ntheta; i++) { - att_r[i] = 0.5 * (Jtr[i] * Jtr[i] + Jrr[i] * Jrr[i]) * coeff_r / fabs(detDFinv_r[i]); - } - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(theta, "theta"); - disp(sin_theta, "sin_theta"); - disp(cos_theta, "cos_theta"); - disp(att_r, "att_r"); - } - return att_r; -} /* ----- end of level::att ----- */ -void gyro::arr_att_art(double r, std::vector theta, std::vector sin_theta, - std::vector cos_theta, int ntheta, std::vector& arr, std::vector& att, - std::vector& art, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - arr = std::vector(ntheta); - att = std::vector(ntheta); - art = std::vector(ntheta); - std::vector detDFinv_r = detDFinv(r, theta, sin_theta, cos_theta, ntheta, verbose); - std::vector Jrr(ntheta); - std::vector Jrt(ntheta); - std::vector Jtr(ntheta); - std::vector Jtt(ntheta); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr, sin_theta, cos_theta); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt, sin_theta, cos_theta); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr, sin_theta, cos_theta); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt, sin_theta, cos_theta); - double coeff_r = coeff_alpha(r, verbose); - for (int i = 0; i < ntheta; i++) { - double coeff = coeff_r / fabs(detDFinv_r[i]); - arr[i] = 0.5 * (Jtt[i] * Jtt[i] + Jrt[i] * Jrt[i]) * coeff; - art[i] = -0.25 * (Jtt[i] * Jtr[i] + Jrt[i] * Jrr[i]) * coeff; - att[i] = 0.5 * (Jtr[i] * Jtr[i] + Jrr[i] * Jrr[i]) * coeff; - } - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(theta, "theta"); - disp(sin_theta, "sin_theta"); - disp(cos_theta, "cos_theta"); - disp(arr, "arr"); - disp(att, "att"); - disp(art, "art"); - } -} /* ----- end of level::arr_att_art ----- */ -void gyro::arr_att_art(std::vector r, double theta, std::vector& arr_r, std::vector& att_r, - std::vector& art_r, int verbose) -{ - double t; - TIC; - - double kappa_eps = dcntl[Param::kappa_eps]; - double delta_e = dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - int size = r.size(); - arr_r = std::vector(size); - att_r = std::vector(size); - art_r = std::vector(size); - std::vector detDFinv_r = detDFinv(r, theta, verbose); - std::vector Jrr(size); - std::vector Jrt(size); - std::vector Jtr(size); - std::vector Jtt(size); - std::vector coeff_r = coeff_alpha(r, verbose); - functions->J_rr(r, theta, kappa_eps, delta_e, Rmax, Jrr); - functions->J_rt(r, theta, kappa_eps, delta_e, Rmax, Jrt); - functions->J_tr(r, theta, kappa_eps, delta_e, Rmax, Jtr); - functions->J_tt(r, theta, kappa_eps, delta_e, Rmax, Jtt); - for (std::size_t j = 0; j < r.size(); j++) { - double coeff = coeff_r[j] / fabs(detDFinv_r[j]); - arr_r[j] = 0.5 * (Jtt[j] * Jtt[j] + Jrt[j] * Jrt[j]) * coeff; - art_r[j] = -0.25 * (Jtt[j] * Jtr[j] + Jrt[j] * Jrr[j]) * coeff; - att_r[j] = 0.5 * (Jtr[j] * Jtr[j] + Jrr[j] * Jrr[j]) * coeff; - } - - dcntl[Param::t_arr_art_att] += TOC; - - if (gyro::icntl[Param::verbose] > 5) { - disp(r, "r"); - disp(detDFinv_r, "detDFinv_r"); - disp(coeff_r, "coeff_r"); - disp(arr_r, "arr_r"); - disp(att_r, "att_r"); - disp(art_r, "art_r"); - } -} /* ----- end of level::arr_att_art ----- */ - -/*************************************************************************** - * Polar to cartesian and back - **************************************************************************/ -/************************ - * Single - ************************/ -/*! - * \brief Transform from polar to cartesian - * - * Transform one couple r_i,theta_j from polar to cartesian - * - * \param r_i: the r coordinate of the node - * \param theta_j: the theta coordinate of the node - * \param x: the x coordinate of the node (out) - * \param y: the y coordinate of the node (out) - * \param verbose: verbose level for debug - * - */ -void gyro::trafo(double& r_i, double& theta_j, double& x, double& y, int verbose) -{ - double t; - TIC; - - double kappa_eps = gyro::dcntl[Param::kappa_eps]; - double delta_e = gyro::dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - - x = functions->x(r_i, theta_j, kappa_eps, delta_e, Rmax); - y = functions->y(r_i, theta_j, kappa_eps, delta_e, Rmax); - - dcntl[Param::t_trafo] += TOC; - - // if (verbose) - // std::cout << "TRAFO (" << r_i << ", " << theta_j << "): (" << x << ", " << y << ")\n"; -} /* ----- end of gyro::trafo ----- */ - -/*! - * \brief Transform from polar to cartesian - * - * TODO: This function could be reimplemented and used for simple geometries - * For more general geometries, the inverse mapping is not available - * and a check on the geometry would be needed. - * - * Transform one couple r_i,theta_j from cartesian to polar - * - * \param r_i: the r coordinate of the node (out) - * \param theta_j: the theta coordinate of the node (out) - * \param x: the x coordinate of the node - * \param y: the y coordinate of the node - * \param verbose: verbose level for debug - * - */ -void gyro::trafo_back(double& r_i, double& theta_j, double& x, double& y, int verbose) -{ - double t; - TIC; - - //double kappa_eps = gyro::dcntl[Param::kappa_eps]; - //double delta_e = gyro::dcntl[Param::delta_e]; - - throw std::runtime_error("No general inverse mapping available."); - /* - if (mod_pk == geometry::CIRCULAR) { - r_i = sqrt(x * x + y * y); - theta_j = atan2(y, x); - } - else if (mod_pk == geometry::SHAFRANOV) { - // Back transformer on (r,phi) of (x,y), see paper https://arxiv.org/pdf/1712.02201.pdf p.4 - r_i = sqrt(2 * ((x * x / pow(1 - kappa_eps, 2) + y * y / pow(1 + kappa_eps, 2))) / - (1 - 2 * delta_e * x / pow(1 - kappa_eps, 2) + - sqrt(pow(1 - 2 * delta_e * x / pow(1 - kappa_eps, 2), 2) - - 4 * pow(delta_e, 2) / pow(1 - kappa_eps, 2) * - (x * x / pow(1 - kappa_eps, 2) + y * y / pow(1 + kappa_eps, 2))))); - theta_j = atan2(y / (1 + kappa_eps), (x + delta_e * r_i * r_i) / (1 - kappa_eps)); - } - else if (mod_pk == geometry::TRIANGULAR) { - throw std::runtime_error("No inverse mapping available for the Czarny geometry."); - r_i = 0; - theta_j = 0; - }*/ - - dcntl[Param::t_trafo] += TOC; - - // if (verbose) - // std::cout << "TRAFO_BACK (" << x << ", " << y << "): (" << r_i << ", " << theta_j << ")\n"; -} /* ----- end of gyro::trafo_back ----- */ - -/************************ - * Vector - ************************/ -/*! - * \brief Transform from polar to cartesian - * - * Transform one couple r_i,theta_j from polar to cartesian - * - * \param r_i: the r coordinate of the node - * \param theta: vector theta (0, ntheta_int) - * \param sin_theta: sines of theta - * \param cos_theta: cosines of theta - * \param ntheta: number of values in theta - * \param x: vector x - * \param y: vector y - * \param verbose: verbose level for debug - * - */ -void gyro::trafo(double r_i, std::vector theta, std::vector sin_theta, std::vector cos_theta, - int ntheta, std::vector& x, std::vector& y, int verbose) -{ - double t; - TIC; - - double kappa_eps = gyro::dcntl[Param::kappa_eps]; - double delta_e = gyro::dcntl[Param::delta_e]; - double Rmax = dcntl[Param::R]; - x = std::vector(ntheta); - y = std::vector(ntheta); - - functions->x(r_i, theta, kappa_eps, delta_e, Rmax, x, sin_theta, cos_theta); - functions->y(r_i, theta, kappa_eps, delta_e, Rmax, y, sin_theta, cos_theta); - - dcntl[Param::t_trafo] += TOC; - - // if (verbose) - // for (int i = 0; i < ntheta; i++) { - // std::cout << "TRAFO (" << r_i << ", " << theta[i] << "): (" << x[i] << ", " << y[i] << ")\n"; - // } -} /* ----- end of gyro::trafo ----- */ - -/*! - * \brief Sparse matrix-vector product - * - * Sparse matrix-vector product: - * - (trans=0) y := alpha*A*x + beta*y - * - (trans=1) y := alpha*A^T*x + beta*y - * - */ -void gyro::sp_dgemv(int trans, int m, int n, double alpha, std::vector row_indices, std::vector col_indices, - std::vector vals, int lda, std::vector x, int incx, double beta, - std::vector& y, int incy) -{ - for (std::size_t i = 0; i < row_indices.size(); i++) { - y[i] = beta * (y[i] + (double)incy); - } - for (std::size_t i = 0; i < row_indices.size(); i++) { - y[row_indices[i]] += vals[i] * (x[col_indices[i]] + (double)incx); - } -} - -/*! - * \brief 2-norm of a vector - * - * Computes the 2-norm of a vector - * - */ -double gyro::norm(std::vector x) -{ - double nrmres = 0; - for (std::size_t i = 0; i < x.size(); i++) { - nrmres += pow(x[i], 2); - } - return sqrt(nrmres); -} - -/*! - * \brief 2-norm of a vector - * - * Computes the 2-norm of a matrix - * - */ -double gyro::A_norm(std::vector x, int m, std::vector row_indices, std::vector col_indices, - std::vector vals) -{ - double nrmres = 0; - std::vector Ax(m, 0.0); - sp_dgemv(0, m, m, 1.0, row_indices, col_indices, vals, m, x, 0, 1.0, Ax, 0); - for (std::size_t i = 0; i < x.size(); i++) { - nrmres += pow(x[i] * Ax[i], 2); - } - return sqrt(nrmres); -} - -void gyro::get_geometry_coeffs(geometry_type geom) -{ - switch (geom) { - case CIRCULAR: - case CULHAM: - gyro::dcntl[Param::kappa_eps] = 0; - gyro::dcntl[Param::delta_e] = 0; - break; - case SHAFRANOV: - gyro::dcntl[Param::kappa_eps] = 0.3; - gyro::dcntl[Param::delta_e] = 0.2; - break; - case TRIANGULAR: - gyro::dcntl[Param::kappa_eps] = 0.3; - gyro::dcntl[Param::delta_e] = 1.4; - break; - } -} - -void gyro::select_functions_class(int alpha_coeff, int beta_coeff, int geometry, int problem) -{ - if (alpha_coeff < 0 or alpha_coeff > 3) - throw std::runtime_error("Unknown alpha coeff"); - if (beta_coeff < 0 or beta_coeff > 1) - throw std::runtime_error("Unknown beta coeff"); - if (geometry < 0 or geometry > 3) - throw std::runtime_error("Unknown geometry"); - if ((problem != 1 and problem < 3) or problem > 7) - throw std::runtime_error("Unknown problem"); - if (problem == 1) - throw std::runtime_error("Flat not implemented"); - - alpha_val alpha = (alpha_val)alpha_coeff; - geometry_type geom = (geometry_type)geometry; - problem_type prob = (problem_type)problem; - std::cout << "GEOMETRY: " << geom << "\n"; - if (beta_coeff) { - switch (alpha) { - case SONNENDRUCKER: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // throw std::runtime_error("Beta coeff cannot be 1/0"); - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case ZONI: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // throw std::runtime_error("Beta coeff cannot be 1/0"); - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case ZONI_SHIFTED: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - case CULHAM: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case REFINED_RADIUS: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - case CULHAM: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // throw std::runtime_error("Beta coeff cannot be 1/0"); - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case POISSON: - throw std::runtime_error("Beta coeff cannot be 1/0"); - break; - default: - throw std::runtime_error("Wrong choice for the alpha coefficient\n"); - break; - } - } - else { - switch (alpha) { - case SONNENDRUCKER: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // switch (geom) { - // case CIRCULAR: gyro::functions = std::make_unique(); break; - // case SHAFRANOV: gyro::functions = std::make_unique(); break; - // case TRIANGULAR: gyro::functions = std::make_unique(); break; - // } - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case ZONI: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // switch (geom) { - // case CIRCULAR: gyro::functions = std::make_unique(); break; - // case SHAFRANOV: gyro::functions = std::make_unique(); break; - // case TRIANGULAR: gyro::functions = std::make_unique(); break; - // } - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case ZONI_SHIFTED: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // switch (geom) { - // case CIRCULAR: gyro::functions = std::make_unique(); break; - // case SHAFRANOV: gyro::functions = std::make_unique(); break; - // case TRIANGULAR: gyro::functions = std::make_unique(); break; - // } - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - case POISSON: - switch (prob) { - case CARTESIAN_R2: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case POLAR_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - case CARTESIAN_R6: - switch (geom) { - case CIRCULAR: - gyro::functions = std::make_unique(); - break; - case SHAFRANOV: - gyro::functions = std::make_unique(); - break; - case TRIANGULAR: - gyro::functions = std::make_unique(); - break; - default: - throw std::runtime_error("Wrong choice for the geometry\n"); - break; - } - break; - //case FLAT: - // switch (geom) { - // case CIRCULAR: gyro::functions = std::make_unique(); break; - // case SHAFRANOV: gyro::functions = std::make_unique(); break; - // case TRIANGULAR: gyro::functions = std::make_unique(); break; - // } - // break; - default: - throw std::runtime_error("Wrong choice for the problem\n"); - break; - } - break; - default: - throw std::runtime_error("Wrong choice for the alpha coefficient\n"); - break; - } - } -} diff --git a/src/level.cpp b/src/level.cpp deleted file mode 100644 index 42f08a2e..00000000 --- a/src/level.cpp +++ /dev/null @@ -1,1438 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file level.cpp - * \brief Header for the class level - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -/*! - * \brief Default Constructor of level class - * - * Default constructor of the level class, sets default values for - * attributes. - * - */ -level::level(int l_) -{ - l = l_; - nr = 0; - ntheta = 0; - reset_timers(); - delete_circles = 0; - -#ifdef GMGPOLAR_USE_MUMPS - init_mumps(mumps_Ac); - if (gyro::icntl[Param::optimized] == 0) { - for (int i = 0; i < 4; i++) { - init_mumps(mumps_A_Zebra[i]); - } - } - else { - init_mumps(mumps_across); - } -#endif -} /* ----- end of constructor level:level ----- */ - -/*! - * \brief Default Destructor of level class - * - * Default destructor of the level class. - * - */ -level::~level() -{ -#ifdef GMGPOLAR_USE_MUMPS - finalize_mumps(mumps_Ac); - if (gyro::icntl[Param::optimized] == 0) { - for (int i = 0; i < 4; i++) { - finalize_mumps(mumps_A_Zebra[i]); - } - } - else { - finalize_mumps(mumps_across); - } -#endif - if (delete_circles > 0) { - for (int smoother = 0; smoother < 4; smoother++) { - delete[] dep_Asc_ortho[smoother]; - delete[] dep_Asc[smoother]; - } - // delete[] dep_u; - } -} /* ----- end of destructor level::~level ----- */ - -/*! - * \brief Sets execution times to 0 - * - * Sets execution times to 0. - * - */ -void level::reset_timers() -{ - t_smoothing = 0; - t_f_sc = 0; - t_Asc_ortho = 0; - t_Asc = 0; - t_get_ptr = 0; - t_get_stencil = 0; - t_get_smoother = 0; - t_get_row = 0; -} /* ----- end of level::reset_timers ----- */ - -/*! - * \brief Display the array theta - * - * Display the array theta - * - */ -void level::display_r() -{ - gyro::disp(r, "Coordinates r"); -} /* ----- end of level::display_r ----- */ - -/*! - * \brief Display the array theta - * - * Display the array theta - * - */ -void level::display_theta() -{ - gyro::disp(theta, "Coordinates theta"); -} /* ----- end of level::display_theta ----- */ - -/*! - * \brief Defines the number of entries in A - * - * returns the numbr of entries in the matrix A - * - */ -void level::define_nz() -{ - nz = 0; - int nr_left = nr; - int nb_DB = (gyro::icntl[Param::DirBC_Interior]) ? 2 : 1; - // - Dirichlet BC nodes - nz += nb_DB * ntheta_int; - nr_left -= nb_DB; - nz += nb_DB * 4 * ntheta_int; // Nodes linked to Dirichlet BC nodes - if (gyro::icntl[Param::mod_pk] > 0) - nz += nb_DB * 2 * ntheta_int; // Only take diagonal values if deformed circle - nr_left -= nb_DB; - // - Across the origin nodes - if (!gyro::icntl[Param::DirBC_Interior]) { - nz += 5 * ntheta_int; // accross the origin - if (gyro::icntl[Param::mod_pk] > 0) - nz += 2 * ntheta_int; // Only take diagonal values if deformed circle - nr_left--; - } - // - Interior nodes - nz += 5 * ntheta_int * nr_left; - if (gyro::icntl[Param::mod_pk] > 0) - nz += 4 * ntheta_int * nr_left; // internal circle -} /* ----- end of gyro::define_nz ----- */ - -/*! - * \brief Defines the index of an entry in A - * - * returns the index of the first entry in the row corresponding to the node (r_j, theta_i) - * - * \param i: the index of the theta coordinate - * \param j: the index of the r coordinate - * - * \return the index - */ -int level::get_ptr(int i, int j) -{ - int ptr = 0; - int nr_left = (j > nr_int - 2) ? nr_int - 1 : j; - i = (i + ntheta_int) % ntheta_int; - - // First circle - int index_theta = (j == 0) ? i : ntheta_int; - // - Dirichlet - if (gyro::icntl[Param::DirBC_Interior]) - ptr += index_theta; - // - Across the origin - else { - ptr += 5 * index_theta; // accross the origin - if (gyro::icntl[Param::mod_pk] > 0) - ptr += 2 * index_theta; // Only take diagonal values if deformed circle - } - nr_left--; - if (j == 0) - return ptr; - - // Second circle if Dirichlet - index_theta = (j == 1) ? i : ntheta_int; - if (gyro::icntl[Param::DirBC_Interior]) { - ptr += 4 * index_theta; // Nodes linked to Dirichlet BC nodes - if (gyro::icntl[Param::mod_pk] > 0) - ptr += 2 * index_theta; // Only take diagonal values if deformed circle - nr_left--; - } - if (gyro::icntl[Param::DirBC_Interior] && j == 1) - return ptr; - - // Interior nodes - index_theta = (j < nr_int - 1) ? i : 0; - ptr += 5 * (ntheta_int * nr_left + index_theta); - if (gyro::icntl[Param::mod_pk] > 0) - ptr += 4 * (ntheta_int * nr_left + index_theta); // internal circle - if (j < nr_int - 1) - return ptr; - - // Penultian circle - index_theta = (j == nr_int - 1) ? i : ntheta_int; - // - Dirichlet - ptr += 4 * index_theta; // Nodes linked to Dirichlet BC nodes - if (gyro::icntl[Param::mod_pk] > 0) - ptr += 2 * index_theta; // Only take diagonal values if deformed circle - if (j == nr_int - 1) - return ptr; - - // Last circle - index_theta = (j == nr_int) ? i : ntheta_int; - // - Dirichlet - ptr += index_theta; - - return ptr; -} /* ----- end of gyro::get_ptr ----- */ - -/*! - * \brief Defines the index of entry for a whole radius in A - * - * returns the index of all entries in the row corresponding to the nodes in r_j - * - * \param j: the index of the r coordinate - * - * \return the vector of index - * - */ -std::vector level::get_ptr(int j) -{ - int ptr = 0; - int shift; - int nr_left = (j > nr_int - 2) ? nr_int - 1 : j; - std::vector ptr_vect(ntheta_int + 2); - - // First circle - // - Dirichlet - if (gyro::icntl[Param::DirBC_Interior]) - shift = 1; - // - Across the origin - else { - shift = 5; // accross the origin - if (gyro::icntl[Param::mod_pk] > 0) - shift = 7; // Only take diagonal values if deformed circle - } - if (j > 0) { - ptr += shift * ntheta_int; - nr_left--; - - // DB_int - if (gyro::icntl[Param::DirBC_Interior]) { - shift = 4; // Nodes linked to Dirichlet BC nodes - if (gyro::icntl[Param::mod_pk] > 0) - shift = 6; // Only take diagonal values if deformed circle - if (j > 1) { - ptr += shift * ntheta_int; - nr_left--; - } - } - } - // Interior nodes - if (j > 1 || (j > 0 && !gyro::icntl[Param::DirBC_Interior])) { - shift = 5; - if (gyro::icntl[Param::mod_pk] > 0) - shift = 9; - ptr += shift * ntheta_int * nr_left; - } - // Penultian circle - if (j >= nr_int - 1) { - // - DB_ext - shift = 4; - if (gyro::icntl[Param::mod_pk] > 0) - shift = 6; - } - // Last circle - if (j > nr_int - 1) { - ptr += shift * ntheta_int; - // - Dirichlet - shift = 1; - } - - for (int i = 0; i < ntheta_int; i++) - ptr_vect[i + 1] = ptr + i * shift; - ptr_vect[0] = ptr_vect[ntheta_int]; - ptr_vect[ntheta_int + 1] = ptr_vect[1]; - return ptr_vect; -} /* ----- end of gyro::get_ptr ----- */ - -/*! - * \brief Defines shifting of each element in the stencil for A - * - * For each node, there are a certain number of entries in the matrix. - * Here we define, for the 9 point stencil, what is the position of each entry. - * -1 means that this entry is not part of the stencil. - * We consider all nodes on a same row have an identical stencil. - * - * \param j: the index of the r coordinate - * - * \return the corresponding stencil - * - */ -std::vector level::get_stencil(int j) -{ - std::vector stencil; - std::vector stencil_DB{-1, -1, -1, -1, 0, -1, -1, -1, -1}; - std::vector stencil_DB_int_next, stencil_DB_ext_next, stencil_accross, stencil_interior; - if (gyro::icntl[Param::mod_pk] == 0) { - stencil_DB_int_next = std::vector{-1, -1, -1, 0, 1, 2, -1, 3, -1}; - stencil_DB_ext_next = std::vector{-1, 0, -1, 1, 2, 3, -1, -1, -1}; - stencil_accross = std::vector{-1, 0, -1, 1, 2, 3, -1, 4, -1}; - stencil_interior = std::vector{-1, 0, -1, 1, 2, 3, -1, 4, -1}; - } - else { - stencil_DB_int_next = std::vector{-1, -1, -1, 0, 1, 2, 3, 4, 5}; - stencil_DB_ext_next = std::vector{0, 1, 2, 3, 4, 5, -1, -1, -1}; - stencil_accross = std::vector{-1, 0, -1, 1, 2, 3, 4, 5, 6}; - stencil_interior = std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8}; - } - - if ((j == 0 && gyro::icntl[Param::DirBC_Interior]) || j == nr_int) - stencil = stencil_DB; - else if (j == 0 && !gyro::icntl[Param::DirBC_Interior]) - stencil = stencil_accross; - else if (j == 1 && gyro::icntl[Param::DirBC_Interior]) - stencil = stencil_DB_int_next; - else if (j == nr_int - 1) - stencil = stencil_DB_ext_next; - else - stencil = stencil_interior; - - return stencil; -} /* ----- end of gyro::get_stencil ----- */ - -/*! - * \brief Defines the number of entries in P - * - * Each coarse node prolongation on a 9-pt stencil - * except the first and last lines which only propagates on the same radius (3-pt) - * returns the numbr of entries in the matrix P - * - */ -void level::define_nz_P() -{ - // nz_P = 9 * ntheta_int * (nr_int / 2 - 1) / 2 + 3 * ntheta_int; - nz_P = (nr_int / 2 + 1) * (ntheta_int / 2) // coarse nodes - + 2 * (nr_int / 2 + 1) * ntheta_int / 2 // same theta - + 2 * (nr_int / 2) * ntheta_int / 2 // same r - + 4 * (nr_int / 2) * ntheta_int / 2; // diagonal relations - - nz_P_inj = mc; - // nz_P_ex = 7 * ntheta_int * (nr_int / 2 - 1) / 2 + 3 * ntheta_int; - nz_P_ex = (nr_int / 2 + 1) * (ntheta_int / 2) // coarse nodes - + 2 * (nr_int / 2 + 1) * ntheta_int / 2 // same theta - + 2 * (nr_int / 2) * ntheta_int / 2 // same r - + 2 * (nr_int / 2) * ntheta_int / 2; // diagonal relations - - // 9 * ntheta_int * nr_int / 4 - // - 9 * ntheta_int / 2 - // + 3 * ntheta_int; -} /* ----- end of gyro::define_nz_P ----- */ - -/*! - * \brief Defines the size and number of entries in Asc/Asc_ortho - * - * returns the size and number of entries in the matrix Asc/Asc_ortho - * - */ -void level::define_m_nz_Asc() -{ - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - int nz_DB, nz_accross, nz_circle, nz_radial_circle, nz_radial, nz_DB_ext; - int nz_DB_noextr, nz_accross_noextr, nz_circle_noextr, nz_radial_circle_noextr, nz_radial_noextr, nz_DB_ext_noextr; - int nz_1st, nz_2nd; - double half = (extrapol) ? 0.5 : 1.0; - - // Define the size of Asc - // - not optimized: complete size - // - optimized: just the size for 1 row - m_sc = std::vector(4); - m_sc = std::vector(4); - if (gyro::icntl[Param::optimized] == 0) { - m_sc[0] = ceil(delete_circles * 0.5) * ntheta_int * half; - m_sc[1] = floor(delete_circles * 0.5) * ntheta_int; - m_sc[2] = ntheta_int * floor((nr_int - delete_circles + 1) * half) * 0.5; - m_sc[3] = ntheta_int * (nr_int - delete_circles + 1) * 0.5; - } - else { - m_sc[0] = ntheta_int * half; - m_sc[1] = ntheta_int; - m_sc[2] = (nr - delete_circles + extrapol * ((nr % 2 == 0) - (delete_circles % 2 == 0))) * half; - m_sc[3] = (nr_int - delete_circles + 1); - } - - // Define the number of entries in Asc_ortho - if (gyro::icntl[Param::mod_pk] == 0) { - nz_DB_noextr = 0; - nz_accross_noextr = 1; - nz_circle_noextr = 2; - nz_radial_circle_noextr = 3; - nz_radial_noextr = 2; - nz_DB_ext_noextr = 2; - nz_accross = (extrapol) ? 3 : nz_accross_noextr; - nz_circle = (extrapol) ? 4 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 4 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 4 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 3 : nz_DB_ext_noextr; - } - else { - nz_DB_noextr = 0; - nz_accross_noextr = 3; - nz_circle_noextr = 6; - nz_radial_circle_noextr = 7; - nz_radial_noextr = 6; - nz_DB_ext_noextr = 4; - nz_accross = (extrapol) ? 5 : nz_accross_noextr; - nz_circle = (extrapol) ? 8 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 8 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 8 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 5 : nz_DB_ext_noextr; - } - nz_radial_circle = (extrapol && delete_circles % 2 == 0) ? 0 : nz_radial_circle; - nz_DB = (extrapol) ? 0 : nz_DB_noextr; - nz_1st = (gyro::icntl[Param::DirBC_Interior]) ? nz_DB_noextr : nz_accross; - // DB_int and Across give the same number of entries here - nz_2nd = (gyro::icntl[Param::DirBC_Interior]) ? nz_accross_noextr : nz_circle_noextr; - nz_sc_ortho = std::vector(4); - nz_sc_ortho[0] = (nz_1st + nz_circle * (ceil(delete_circles * 0.5) - 1)) * ntheta_int * half; - nz_sc_ortho[1] = (nz_2nd + nz_circle_noextr * (floor(delete_circles * 0.5) - 1)) * ntheta_int; - nz_sc_ortho[2] = (nz_radial_circle + floor(nz_radial * (nr_int - delete_circles - 2) * half) + nz_DB_ext + nz_DB) * - ntheta_int * 0.5; - nz_sc_ortho[3] = - (nz_radial_circle_noextr + nz_radial_noextr * (nr_int - delete_circles - 2) + nz_DB_ext_noextr + nz_DB_noextr) * - ntheta_int * 0.5; -} /* ----- end of gyro::define_m_nz_Asc ----- */ - -/*! - * \brief Defines the size and number of entries in Asc/Asc_ortho - * - * returns the size and number of entries in the matrix Asc/Asc_ortho - * - */ -int level::define_nz_Asc_ij(int smoother, int ij, int ortho) -{ - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - int nz_DB, nz_accross, nz_circle, nz_radial_circle, nz_radial, nz_DB_ext; - int nz_DB_noextr, nz_accross_noextr, nz_circle_noextr, nz_radial_circle_noextr, nz_radial_noextr, nz_DB_ext_noextr; - int nz_1st, nz_2nd; - int nz = 0; - double half = (extrapol) ? 0.5 : 1.0; - - if (!ortho) { - nz_DB_noextr = 1; - nz_accross_noextr = 4; - nz_circle_noextr = 3; - nz_radial_circle_noextr = 2; - nz_radial_noextr = 3; - nz_DB_ext_noextr = 2; - nz_DB = (extrapol) ? 0 : nz_DB_noextr; - nz_accross = (extrapol) ? 2 : nz_accross_noextr; - nz_circle = (extrapol) ? 1 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 1 : nz_radial_circle_noextr; - nz_radial_circle = (extrapol && delete_circles % 2 == 0) ? 0 : nz_radial_circle; - nz_radial = (extrapol) ? 1 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 1 : nz_DB_ext_noextr; - nz_1st = (gyro::icntl[Param::DirBC_Interior]) ? nz_DB_noextr : nz_accross; - nz_2nd = nz_circle_noextr; - } - else { - if (gyro::icntl[Param::mod_pk] == 0) { - nz_DB_noextr = 0; - nz_accross_noextr = 1; - nz_circle_noextr = 2; - nz_radial_circle_noextr = 3; - nz_radial_noextr = 2; - nz_DB_ext_noextr = 2; - nz_accross = (extrapol) ? 3 : nz_accross_noextr; - nz_circle = (extrapol) ? 4 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 4 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 4 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 3 : nz_DB_ext_noextr; - } - else { - nz_DB_noextr = 0; - nz_accross_noextr = 3; - nz_circle_noextr = 6; - nz_radial_circle_noextr = 7; - nz_radial_noextr = 6; - nz_DB_ext_noextr = 4; - nz_accross = (extrapol) ? 5 : nz_accross_noextr; - nz_circle = (extrapol) ? 8 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 8 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 8 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 5 : nz_DB_ext_noextr; - } - nz_radial_circle = (extrapol && delete_circles % 2 == 0) ? 0 : nz_radial_circle; - nz_DB = (extrapol) ? 0 : nz_DB_noextr; - nz_1st = (gyro::icntl[Param::DirBC_Interior]) ? nz_DB_noextr : nz_accross; - // DB_int and Across give the same number of entries here - nz_2nd = (gyro::icntl[Param::DirBC_Interior]) ? nz_accross_noextr : nz_circle_noextr; - } - if (smoother == 0) { - if (ij == 0) - nz = nz_1st * ntheta_int * half; - else - nz = nz_circle * ntheta_int * half; - } - else if (smoother == 1) { - if (ij == 1) - nz = nz_2nd * ntheta_int; - else - nz = nz_circle_noextr * ntheta_int; - } - else if (smoother == 2) { - nz = nz_radial_circle + floor(nz_radial * (nr_int - delete_circles - 2) * half) + nz_DB_ext + nz_DB; - } - else if (smoother == 3) { - nz = nz_radial_circle_noextr + nz_radial_noextr * (nr_int - delete_circles - 2) + nz_DB_ext_noextr + - nz_DB_noextr; - } - return nz; -} /* ----- end of gyro::define_m_nz_Asc_ij ----- */ - -/*! - * \brief Defines the index of entry for a whole radius in Asc/Asc_ortho - * - * returns the index of all entries in the row corresponding to the nodes in r_j - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param ortho: 0: Asc, 1: Asc_ortho - * - * \return the vector of index - * - */ -std::vector level::get_ptr_sc(int j, int smoother, int ortho) -{ - double t; - TIC; - - if ((j >= delete_circles && smoother < 2) || j < delete_circles && smoother > 1) - throw std::runtime_error("(get_ptr_sc) Incompatible radius and smoother."); - - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - // For the radial smoother, we need to separate smoother 2 and 3 (ptr/ptr3 and shift/shift3) - // since we explore radius per raidus - int ptr = 0, ptr3 = 0; - int shift, shift3, nr_left; - int nz_DB, nz_accross, nz_circle, nz_radial_circle, nz_radial, nz_DB_ext; - int nz_DB_noextr, nz_accross_noextr, nz_circle_noextr, nz_radial_circle_noextr, nz_radial_noextr, nz_DB_ext_noextr; - int nz_1st, nz_2nd; - double half = (extrapol && smoother != 1) ? 0.5 : 1.0; - std::vector ptr_vect(ntheta_int); - - if (!ortho) { - nz_DB_noextr = 1; - nz_accross_noextr = 4; - nz_circle_noextr = 3; - nz_radial_circle_noextr = 2; - nz_radial_noextr = 3; - nz_DB_ext_noextr = 2; - nz_accross = (extrapol) ? 2 : nz_accross_noextr; - nz_circle = (extrapol) ? 1 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 1 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 1 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 1 : nz_DB_ext_noextr; - nz_2nd = nz_circle_noextr; - } - else { - if (gyro::icntl[Param::mod_pk] == 0) { - nz_DB_noextr = 0; - nz_accross_noextr = 1; - nz_circle_noextr = 2; - nz_radial_circle_noextr = 3; - nz_radial_noextr = 2; - nz_DB_ext_noextr = 2; - nz_accross = (extrapol) ? 3 : nz_accross_noextr; - nz_circle = (extrapol) ? 4 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 4 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 4 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 3 : nz_DB_ext_noextr; - } - else { - nz_DB_noextr = 0; - nz_accross_noextr = 3; - nz_circle_noextr = 6; - nz_radial_circle_noextr = 7; - nz_radial_noextr = 6; - nz_DB_ext_noextr = 4; - nz_accross = (extrapol) ? 5 : nz_accross_noextr; - nz_circle = (extrapol) ? 8 : nz_circle_noextr; - nz_radial_circle = (extrapol) ? 8 : nz_radial_circle_noextr; - nz_radial = (extrapol) ? 8 : nz_radial_noextr; - nz_DB_ext = (extrapol) ? 5 : nz_DB_ext_noextr; - } - // DB_int and Across give the same number of entries here - nz_2nd = (gyro::icntl[Param::DirBC_Interior]) ? nz_accross_noextr : nz_circle_noextr; - } - nz_1st = (gyro::icntl[Param::DirBC_Interior]) ? nz_DB_noextr : nz_accross; - nz_radial_circle = (extrapol && delete_circles % 2 == 0) ? 0 : nz_radial_circle; - nz_DB = (extrapol) ? 0 : nz_DB_noextr; - - if (!ortho) { - if (j < delete_circles) { - if (smoother == 0) { - shift = nz_1st; - if (j > 0) { - shift = nz_circle; - } - } - else if (smoother == 1) { - shift = nz_2nd; - if (j > 1) { - shift = nz_circle_noextr; - } - } - // In case of extrapol and smoother==0, there are only half of points in the grid: take twice - // the same values for each in order to respect the theta index i - for (int i = 0; i < ntheta_int; i++) - ptr_vect[i] = ptr + floor(i * half) * shift; - } - else { - shift = nz_radial_circle; - shift3 = nz_radial_circle_noextr; - if (j > delete_circles) { - ptr += shift; - ptr3 += shift3; - - // Radial nodes - shift = nz_radial; - shift3 = nz_radial_noextr; - ptr += shift * floor(std::min(j - delete_circles - 1, nr_int - delete_circles - 2) * half); - ptr3 += shift3 * std::min(j - delete_circles - 1, nr_int - delete_circles - 2); - } - // - DB_ext - if (j >= nr_int - 1) { - shift = nz_DB_ext; - shift3 = nz_DB_ext_noextr; - } - // Last circle - if (j > nr_int - 1) { - ptr += shift; - ptr3 += shift3; - shift = nz_DB; - shift3 = nz_DB_noextr; - } - - for (int i = 0; i < ntheta_int; i += 2) { - ptr_vect[i] = ptr; - ptr_vect[i + 1] = ptr3; - } - } - } - else { - if (j < delete_circles) { - if (smoother == 0) { - shift = nz_1st; - if (j > 0) { - ptr += shift * ntheta_int * half; - - shift = nz_circle; - nr_left = ceil((double)(j - 1) * 0.5) - 1; - ptr += shift * nr_left * ntheta_int * half; - } - } - else if (smoother == 1) { - shift = nz_2nd; - if (j > 1) { - ptr += shift * ntheta_int * half; - - shift = nz_circle_noextr; - nr_left = floor((double)(j - 1) * 0.5) - 1; - ptr += shift * nr_left * ntheta_int; - } - } - // In case of extrapol and smoother==0, there are only half of points in the grid: take twice - // the same values for each in order to respect the theta index i - for (int i = 0; i < ntheta_int; i++) - ptr_vect[i] = ptr + floor(i * half) * shift; - } - else { - // Radial-Circle nodes - shift = nz_radial_circle; - shift3 = nz_radial_circle_noextr; - if (j > delete_circles) { - ptr += shift * ntheta_int * 0.5; - ptr3 += shift3 * ntheta_int * 0.5; - - // Radial nodes - shift = nz_radial; - shift3 = nz_radial_noextr; - ptr += shift * floor(std::min(j - delete_circles - 1, nr_int - delete_circles - 2) * half) * - ntheta_int / 2; - ptr3 += shift3 * std::min(j - delete_circles - 1, nr_int - delete_circles - 2) * ntheta_int / 2; - } - // - DB_ext - if (j >= nr_int - 1) { - shift = nz_DB_ext; - shift3 = nz_DB_ext_noextr; - } - // Last circle - if (j > nr_int - 1) { - ptr += shift * ntheta_int / 2; - ptr3 += shift3 * ntheta_int / 2; - shift = nz_DB; - shift3 = nz_DB_noextr; - } - - for (int i = 0; i < ntheta_int; i += 2) { - ptr_vect[i] = ptr + i / 2 * shift; - ptr_vect[i + 1] = ptr3 + i / 2 * shift3; - } - } - } - -#pragma omp atomic - t_get_ptr += TOC; - - return ptr_vect; -} /* ----- end of gyro::get_ptr_sc ----- */ - -/*! - * \brief Defines the smoother on node (i, j) - * - * Defines the smoother on node (i, j) - * - * \param i: the index of the theta coordinate - * \param j: the index of the r coordinate - * - * \return the corresponding smoother - * - */ -int level::get_smoother(int i, int j) -{ - double t; - TIC; - - int smoother = 0; - //!check, which smoother the point belongs to: 0 circle black, 1 circle white, 2 radial black, 3 radial white - if (j < delete_circles) { - if (j % 2 == 0) { - smoother = 0; //circle black (even) - } - else { - smoother = 1; //circle white (odd) - } - } - else { - if (i % 2 == 0) { - smoother = 2; //radial black (even) - } - else { - smoother = 3; //radial white (odd) - } - } - -#pragma omp atomic - t_get_smoother += TOC; - - return smoother; -} /* ----- end of gyro::get_smoother ----- */ - -/*! - * \brief Defines the smoother for a whole theta line - * - * Defines the smoother on theta i - * - * \param i: the index of the theta coordinate - * - * \return the corresponding smoothers - * - */ -std::vector level::get_smoother_circle(int i) -{ - double t; - TIC; - - std::vector smoother(delete_circles, 0); - for (int j = 1; j < delete_circles; j += 2) - smoother[j] = 1; - -#pragma omp atomic - t_get_smoother += TOC; - return smoother; -} /* ----- end of gyro::get_smoother_circle ----- */ - -/*! - * \brief Defines the smoother for a whole radius - * - * Defines the smoother on r j - * - * \param j: the index of the r coordinate - * - * \return the corresponding smoothers - * - */ -std::vector level::get_smoother_radial(int j) -{ - double t; - TIC; - - std::vector smoother(ntheta_int, 2); - for (int i = 1; i < ntheta_int; i += 2) - smoother[i] = 3; - -#pragma omp atomic - t_get_smoother += TOC; - return smoother; -} /* ----- end of gyro::get_smoother_radial ----- */ - -/*! - * \brief Defines shifting of each element in the stencil for Asc/Asc_ortho - * - * For each node, there are a certain number of entries in the matrix Asc/Asc_ortho. - * Here we define, for the 9 point stencil, what is the position of each entry. - * -1 means that this entry is not part of the stencil. - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param ortho: 0: Asc, 1: Asc_ortho - * - * \return the corresponding stencil - * - */ -std::vector level::get_stencil_sc(int j, int smoother, int ortho) -{ - double t; - TIC; - - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0 && (smoother == 0 || smoother == 2); - std::vector stencil, stencil_DB, stencil_DB_int, stencil_accross, stencil_circle, stencil_radial_circle, - stencil_radial, stencil_DB_ext; - - if (!ortho) { - if (!extrapol) { - stencil_DB = std::vector{-1, -1, -1, -1, 0, -1, -1, -1, -1}; - stencil_circle = std::vector{-1, -1, -1, 0, 1, 2, -1, -1, -1}; - stencil_accross = std::vector{-1, 0, -1, 1, 2, 3, -1, -1, -1}; - stencil_radial_circle = std::vector{-1, -1, -1, -1, 0, -1, -1, 1, -1}; - stencil_radial = std::vector{-1, 0, -1, -1, 1, -1, -1, 2, -1}; - stencil_DB_ext = std::vector{-1, 0, -1, -1, 1, -1, -1, -1, -1}; - } - else { - stencil_DB = std::vector{-1, -1, -1, -1, 0, -1, -1, -1, -1}; - stencil_accross = std::vector{-1, 0, -1, -1, 1, -1, -1, -1, -1}; - stencil_circle = stencil_DB; - stencil_radial_circle = stencil_DB; - stencil_radial = stencil_DB; - stencil_DB_ext = stencil_DB; - } - stencil_DB_int = stencil_circle; - } - else { - if (gyro::icntl[Param::mod_pk] == 0) { - if (!extrapol) { - stencil_DB = std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1}; - stencil_accross = std::vector{-1, -1, -1, -1, -1, -1, -1, 0, -1}; - stencil_circle = std::vector{-1, 0, -1, -1, -1, -1, -1, 1, -1}; - stencil_radial_circle = std::vector{-1, 0, -1, 1, -1, 2, -1, -1, -1}; - stencil_radial = std::vector{-1, -1, -1, 0, -1, 1, -1, -1, -1}; - stencil_DB_ext = std::vector{-1, -1, -1, 0, -1, 1, -1, -1, -1}; - } - else { - stencil_DB = std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1}; - stencil_accross = std::vector{-1, -1, -1, 0, -1, 1, -1, 2, -1}; - stencil_circle = std::vector{-1, 0, -1, 1, -1, 2, -1, 3, -1}; - stencil_radial_circle = stencil_circle; - stencil_radial = stencil_circle; - stencil_DB_ext = std::vector{-1, 0, -1, 1, -1, 2, -1, -1, -1}; - } - } - else { - if (!extrapol) { - stencil_DB = std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1}; - stencil_accross = std::vector{-1, -1, -1, -1, -1, -1, 0, 1, 2}; - stencil_circle = std::vector{0, 1, 2, -1, -1, -1, 3, 4, 5}; - stencil_radial_circle = std::vector{0, 1, 2, 3, -1, 4, 5, -1, 6}; - stencil_radial = std::vector{0, -1, 1, 2, -1, 3, 4, -1, 5}; - stencil_DB_ext = std::vector{0, -1, 1, 2, -1, 3, -1, -1, -1}; - } - else { - stencil_DB = std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1}; - stencil_accross = std::vector{-1, -1, -1, 0, -1, 1, 2, 3, 4}; - stencil_circle = std::vector{0, 1, 2, 3, -1, 4, 5, 6, 7}; - stencil_radial_circle = stencil_circle; - stencil_radial = stencil_circle; - stencil_DB_ext = std::vector{0, 1, 2, 3, -1, 4, -1, -1, -1}; - } - } - stencil_DB_int = stencil_accross; - } - - if (j == 0) - stencil = (gyro::icntl[Param::DirBC_Interior]) ? stencil_DB : stencil_accross; - else if (j == 1 && gyro::icntl[Param::DirBC_Interior]) - stencil = stencil_DB_int; - else if (j < delete_circles) - stencil = stencil_circle; - else if (j == delete_circles) - stencil = stencil_radial_circle; - else if (j < nr_int - 1) - stencil = stencil_radial; - else if (j == nr_int - 1) - stencil = stencil_DB_ext; - else if (j == nr_int) - stencil = stencil_DB; - else - throw std::runtime_error("(get_stencil_sc) Stencil not recognized."); - -#pragma omp atomic - t_get_stencil += TOC; - return stencil; -} /* ----- end of level::get_stencil_sc ----- */ - -/*! - * \brief Row/Column for the point (i, j) for Asc - * - * Returns the row/column for the point (i, j) with smoother and extrapol parameters for Asc - * - * \param i: the index of the theta coordinate - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the corresponding row - * - */ -int level::get_row(int i, int j, int smoother, int extrapol) -{ - double t; - TIC; - - int row = 0; - if (smoother < 2) { - j = smoother; // row per row - row = ((j - smoother) * ntheta_int * 0.5 + i + extrapol * (smoother - 1)) / (1 + extrapol * (1 - smoother)); - } - else if (smoother > 1) { - // // Row-wise (mixed B n W) - // row = (j - delete_circles - extrapol * (3 - smoother) * (delete_circles % 2 == 0)) * ntheta_int * 0.5 / - // (1 + extrapol * (3 - smoother)) + - // (i + 2 - smoother) / 2; - // Col-wise (line by line) - // row = ((j - delete_circles - extrapol * (3 - smoother) * (delete_circles % 2 == 0)) + - // (i + 2 - smoother) * (nr - delete_circles + 1 - extrapol * (3 - smoother) * (nr + 1) % 2) * 0.5) / - // (1 + extrapol * (3 - smoother)); - i = 0; // column per column - row = (j - delete_circles - extrapol * (3 - smoother) * (delete_circles % 2 == 0)) / - (1 + extrapol * (3 - smoother)) + - (i + 2 - smoother) * 0.5 * - (nr - delete_circles + extrapol * (3 - smoother) * ((nr % 2 == 0) - (delete_circles % 2 == 0))) / - (1 + extrapol * (3 - smoother)); - } - -#pragma omp atomic - t_get_row += TOC; - return row; -} /* ----- end of level::get_row ----- */ - -/*! - * \brief Row/Column for a whole radius for Asc - * - * Returns the row/column for the whole radius j with smoother and extrapol parameters for Asc - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the vector of row indices - * - */ -std::vector level::get_row(int j, int smoother, int extrapol, int local, int col_wise) -{ - double t; - TIC; - - double coeff, coeff2, coeff3, shift, shift2, shift3; - - std::vector row(ntheta_int); - if (smoother < 2) { - if (local) - j = smoother; // row per row - coeff = 1.0 / (double)(1 + extrapol * (1 - smoother)); - shift = ((j - smoother) * ntheta_int * 0.5 + extrapol * (smoother - 1)); - for (int i = 0; i < ntheta_int; i++) - row[i] = coeff * (i + shift); - } - else if (smoother > 1) { - // Row-wise (mixed B n W) - if (!col_wise) { - coeff = 0.5; - shift2 = - (j - delete_circles - extrapol * (delete_circles % 2 == 0)) * ntheta_int * 0.5 / (double)(1 + extrapol); - shift3 = ((j - delete_circles) * ntheta_int - 1) * 0.5; - for (int i = 0; i < ntheta_int; i += 2) - row[i] = coeff * i + shift2; - for (int i = 1; i < ntheta_int; i += 2) - row[i] = coeff * i + shift3; - } - else { - if (local) { - // Col-wise (line by line) - shift2 = (j - delete_circles - extrapol * (delete_circles % 2 == 0)) / (1 + extrapol); - shift3 = (j - delete_circles); // - 0.5 * (nr - delete_circles); - coeff2 = 0.5 * (nr - delete_circles + extrapol * ((nr % 2 == 0) - (delete_circles % 2 == 0))) / - (1 + extrapol); - coeff3 = 0.5 * (nr - delete_circles); - for (int i = 0; i < ntheta_int; i += 2) - row[i] = shift2; - for (int i = 1; i < ntheta_int; i += 2) - row[i] = shift3; - } - else { - shift2 = (j - delete_circles - extrapol * (delete_circles % 2 == 0)) / (1 + extrapol); - shift3 = (j - delete_circles) - 0.5 * (nr - delete_circles); - coeff2 = 0.5 * (nr - delete_circles + extrapol * ((nr % 2 == 0) - (delete_circles % 2 == 0))) / - (1 + extrapol); - coeff3 = 0.5 * (nr - delete_circles); - for (int i = 0; i < ntheta_int; i += 2) - row[i] = coeff2 * i + shift2; - for (int i = 1; i < ntheta_int; i += 2) - row[i] = coeff3 * i + shift3; - } - } - } - -#pragma omp atomic - t_get_row += TOC; - return row; -} /* ----- end of level::get_row ----- */ - -/*! - * \brief Row/Column for a whole radius for Asc - * - * Returns the row/column for the whole radius j with smoother and extrapol parameters for Asc - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the vector of row indices - * - */ -std::vector level::get_row_i(int size, int i, int smoother, int extrapol) -{ - double t; - TIC; - - double coeff, shift; - - std::vector row(size); - if (smoother < 2) { - std::cout << "SHOULD NOT BE CALLED WITH THIS SMOOTHER\n"; - } - else if (smoother > 1) { - coeff = 1.0 / (1 + (3 - smoother) * extrapol); - shift = -delete_circles - (3 - smoother) * extrapol * (delete_circles % 2 == 0); - for (int j = 0; j < size; j++) - row[j] = coeff * (j + shift); - } - -#pragma omp atomic - t_get_row += TOC; - return row; -} /* ----- end of level::get_row ----- */ - -/*! - * \brief Row/Column for a whole radius for Asc - * - * Returns the row/column for the whole radius j with smoother and extrapol parameters for Asc - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the vector of row indices - * - */ -std::vector level::get_row_i_glob(int size, int i, int smoother, int extrapol) -{ - double t; - TIC; - - double coeff, shift; - - std::vector row(size); - if (smoother < 2) { - std::cout << "SHOULD NOT BE CALLED WITH THIS SMOOTHER\n"; - } - else if (smoother > 1) { - coeff = 1.0 / (1 + (3 - smoother) * extrapol); - shift = (-delete_circles - extrapol * (3 - smoother) * (delete_circles % 2 == 0)) + - (i + 2 - smoother) * 0.5 * - (nr - delete_circles + extrapol * (3 - smoother) * ((nr % 2 == 0) - (delete_circles % 2 == 0))); - for (int j = 0; j < size; j++) - row[j] = coeff * (j + shift); - } - -#pragma omp atomic - t_get_row += TOC; - return row; -} /* ----- end of level::get_row ----- */ - -/*! - * \brief Row/Column for a whole radius for Asc - * - * Returns the row/column for the whole radius j with smoother and extrapol parameters for Asc - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the vector of row indices - * - */ -int level::mapping_usc_to_u(int ind_sc, int smoother) -{ - double t; - TIC; - - int extrapol = gyro::icntl[Param::extrapolation]; - extrapol = extrapol == 1 && l == 0; - //only for the circle black smoother, don't change the variable of the class itself - - //computation of indices in the total vector u corresponding to the indices in u_sc - // for (long unsigned int ind_sc = 0; ind_sc < u_sc.size(); ++i) { - int row; - int col; - - if (smoother < 2) { //circle - int ntheta_int_local = ntheta_int; - if (extrapol && smoother == 0) { //circle, black - ntheta_int_local = ntheta_int / 2; - } - row = 2 * (ind_sc / ntheta_int_local); //row within the smoother - col = ind_sc % ntheta_int_local; - if (smoother == 1) { //white - row++; - } - if (extrapol && smoother == 0) { //black - col = col * 2 + 1; //augment col in case of extrapolation - } - } - else { //radial - // // Row-wise (mixed B n W) - // if (smoother == 2) { //black - // int n_lines_radial_b = ceil((double)ntheta_int / 2); - // row = ind_sc / n_lines_radial_b; //row within the smoother - // col = 2 * (ind_sc % n_lines_radial_b); //col within the smoother - // if (extrapol) { - // row = row * 2; //augment row in case of extrapolation - // if (delete_circles % 2 == 0) { //delete_circles = even - // row = row + 1; - // } - // } - // } - // else { //white - // int n_lines_radial_w = floor((double)ntheta_int / 2); - // row = ind_sc / n_lines_radial_w; //row within the smoother - // col = 2 * (ind_sc % n_lines_radial_w) + 1; //col within the smoother - // } - // Col-wise (line by line) - int n_rows = (nr - delete_circles + extrapol * (3 - smoother) * ((nr % 2 == 0) - (delete_circles % 2 == 0))) / - (1 + extrapol * (3 - smoother)); - col = 2 * (ind_sc / n_rows); - if (smoother == 3) - col++; - row = ind_sc % n_rows; - if (extrapol && smoother == 2) - row = 2 * row + (delete_circles + 1) % 2; - - row += delete_circles; //row within the whole matrix - } - - int ind = row * ntheta_int + col; - -#pragma omp atomic - t_get_row += TOC; - - return ind; -} /* ----- end of level::mapping_usc_to_u ----- */ - -/*! - * \brief Row/Column for a whole radius for Asc - * - * Returns the row/column for the whole radius j with smoother and extrapol parameters for Asc - * - * \param j: the index of the r coordinate - * \param smoother: the current smoother - * \param extrapol: level=0 and we use implicit extrapolation - * - * \return the vector of row indices - * - */ -std::vector level::mapping_usc_to_u(int ind_sc_start, int ind_sc_end, int smoother) -{ - double t; - TIC; - - int extrapol = gyro::icntl[Param::extrapolation]; - extrapol = extrapol == 1 && l == 0; - //only for the circle black smoother, don't change the variable of the class itself - - //computation of indices in the total vector u corresponding to the indices in u_sc - // for (long unsigned int ind_sc = 0; ind_sc < u_sc.size(); ++i) { - int row; - int col; - std::vector ind(ind_sc_end - ind_sc_start); - - if (smoother < 2) { //circle - int ntheta_int_local = ntheta_int; - int is_extrapol = 0; - if (extrapol && smoother == 0) { //circle, black - ntheta_int_local = ntheta_int / 2; - is_extrapol = 1; - } - for (int i = ind_sc_start; i < ind_sc_end; i++) { - row = 2 * (i / ntheta_int_local) + (smoother == 1); //row within the smoother - col = i % ntheta_int_local; - col = col * (1 + is_extrapol) + is_extrapol; - ind[i - ind_sc_start] = row * ntheta_int + col; - } - } - else { //radial - // Col-wise (line by line) - int n_rows = (nr - delete_circles + extrapol * (3 - smoother) * ((nr % 2 == 0) - (delete_circles % 2 == 0))) / - (1 + extrapol * (3 - smoother)); - int is_extrapol = 0; - if (extrapol && smoother == 2) - is_extrapol = 1; - for (int i = ind_sc_start; i < ind_sc_end; i++) { - col = 2 * (i / n_rows) + (smoother == 3); - row = i % n_rows; - row = row * (1 + is_extrapol) + is_extrapol * ((delete_circles + 1) % 2); - row += delete_circles; - ind[i - ind_sc_start] = row * ntheta_int + col; - } - } - -#pragma omp atomic - t_get_row += TOC; - - return ind; -} /* ----- end of level::mapping_usc_to_u ----- */ - -/*! - * \brief Creates grid division in r from a file - * - * Creates grid division in r from a file containing comma-separated radii - * - */ -void level::read_grid_r() -{ - std::fstream f; - - f.open(gyro::f_grid_r.c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << gyro::f_grid_r.c_str() << "\n"; - } - else { - while (1) { - double r_val; - f >> r_val; - if (f.eof()) - break; - r.push_back(r_val); - } - } - f.close(); - nr = r.size(); -} /* ----- end of level::read_grid ----- */ - -/*! - * \brief Creates grid division in theta from a file - * - * Creates grid division in theta from a file containing comma-separated radii - * - */ -void level::read_grid_theta() -{ - std::fstream f; - - f.open(gyro::f_grid_theta.c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << gyro::f_grid_theta.c_str() << "\n"; - } - else { - while (1) { - double theta_val; - f >> theta_val; - if (f.eof()) - break; - theta.push_back(theta_val); - } - } - f.close(); - ntheta = theta.size(); -} /* ----- end of level::read_grid ----- */ - -/*! - * \brief Creates grid division in r from a file - * - * Creates grid division in r from a file containing comma-separated radii - * - */ -void level::write_grid_r() -{ - std::fstream f; - std::stringstream folder; - - size_t pos = 0; - std::string token; - std::string original = gyro::f_grid_r; - while ((pos = original.find("/")) != std::string::npos) { - token = original.substr(0, pos); - folder << token << "/"; - original.erase(0, pos + 1); - const int dir_err0 = mkdir(folder.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - } - - f.open(gyro::f_grid_r.c_str(), std::ios::out); - if (!f) { - std::cout << "No such file: " << gyro::f_grid_r.c_str() << "\n"; - } - else { - for (int i = 0; i < r.size(); i++) { - f << std::setprecision(17) << r[i] << "\n"; - } - } - f.close(); -} /* ----- end of level::read_grid ----- */ - -/*! - * \brief Creates grid division in theta from a file - * - * Creates grid division in theta from a file containing comma-separated radii - * - */ -void level::write_grid_theta() -{ - std::fstream f; - std::stringstream folder; - - size_t pos = 0; - std::string token; - std::string original = gyro::f_grid_theta; - while ((pos = original.find("/")) != std::string::npos) { - token = original.substr(0, pos); - folder << token << "/"; - original.erase(0, pos + 1); - const int dir_err0 = mkdir(folder.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - } - - f.open(gyro::f_grid_theta.c_str(), std::ios::out); - if (!f) { - std::cout << "No such file: " << gyro::f_grid_theta.c_str() << "\n"; - } - else { - for (int i = 0; i < theta.size(); i++) { - f << std::setprecision(17) << theta[i] << "\n"; - } - } - f.close(); -} /* ----- end of level::read_grid ----- */ - -/*! - * \brief Reads the theoretical solution - * - * Reads the theoretical solution from an input file with 1 entry per line - * - */ -void level::read_sol() -{ - std::fstream f; - - f.open(gyro::f_sol_in.c_str(), std::ios::in); - if (!f) { - std::cout << "No such file: " << gyro::f_sol_in.c_str() << "\n"; - } - else { - while (1) { - double r_val; - f >> r_val; - if (f.eof()) - break; - sol_in.push_back(r_val); - } - } - f.close(); - if (sol_in.size() != (size_t)m) - throw std::runtime_error("The provided theoretical solution does not have the same size m as the system."); -} /* ----- end of level::read_grid ----- */ - -/*! - * \brief Creates grid division in theta from a file - * - * Creates grid division in theta from a file containing comma-separated radii - * - */ -void level::write_sol() -{ - std::fstream f; - std::stringstream folder; - - size_t pos = 0; - std::string token; - std::string original = gyro::f_sol_out; - while ((pos = original.find("/")) != std::string::npos) { - token = original.substr(0, pos); - folder << token << "/"; - original.erase(0, pos + 1); - const int dir_err0 = mkdir(folder.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - } - - f.open(gyro::f_sol_out.c_str(), std::ios::out); - if (!f) { - std::cout << "No such file: " << gyro::f_sol_out.c_str() << "\n"; - } - else { - f << "# nr : " << r.size() << " ntheta : " << theta.size() << std::endl; - double kappa_eps = gyro::dcntl[Param::kappa_eps]; - double delta_e = gyro::dcntl[Param::delta_e]; - double Rmax = gyro::dcntl[Param::R]; - for (int i = 0; i < u.size(); i++) { - double r_i = r[int(i / theta.size())]; - double theta_i = theta[i % theta.size()]; - double x = gyro::functions->x(r_i, theta_i, kappa_eps, delta_e, Rmax); - double y = gyro::functions->y(r_i, theta_i, kappa_eps, delta_e, Rmax); - f << std::setprecision(17) << r_i << " " << theta_i << " " << x << " " << y << " " << u[i] << "\n"; - } - } - f.close(); -} /* ----- end of level::read_grid ----- */ diff --git a/src/main.cpp b/src/main.cpp index 5e18b313..fa549f60 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,485 +1,39 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ +#include -/** - * \file main.cpp - * \brief Test program to launch the application from: - * "Implicitly extrapolated geometric multigrid on disk-like domains for - the gyrokinetic Poisson equation from fusion plasma applications", Martin - Joachim Kühn, Carola Kruse, Ulrich Rüde - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - * \date March 31st 2021 - * - * This program launch the application with the problem and parameters specified in a - * configuration file (first argument or "config_file.info" by default) - * - */ -#include -#include -#include -#include "cmdline.h" -#include "gmgpolar.h" +#include "../include/GMGPolar/gmgpolar.h" -#define ICPU sched_getcpu() -#define NOMP omp_get_num_threads() -#define IOMP omp_get_thread_num() +#include "../include/DirectSolver/directSolver.h" -/** - * \fn int main () - * \brief Main function - * - * \param 1: configuration file (Optional) - * \return EXIT_SUCCESS - Arrêt normal du programme. - */ -int main(int argc, char* argv[]) -{ -#ifdef GMGPOLAR_USE_LIKWID - LIKWID_MARKER_INIT; -#endif +int main(int argc, char* argv[]) { + // Display Build Type + #ifdef NDEBUG + std::cout << "Build Type: Release" << std::endl; + #else + std::cout << "Build Type: Debug" << std::endl; + #endif - int error = 0; + #ifdef GEOM_SHAFRANOV + std::cout << "Geometry: Shafranov" << std::endl; + #else + std::cout << "Geometry: Czarny" << std::endl; + #endif - //////////////////////////////////////////////////////////////////////////////// - // READING PARAMETERS - //////////////////////////////////////////////////////////////////////////////// - cmdline::parser a; - a.add("optimized", '\0', "", false, 1); - a.add("matrix_free", '\0', "", false, 1); - a.add("debug", 'D', "", false, 0); - a.add("nr_exp", 'n', "", false, 4); - a.add("ntheta_exp", '\0', "", false, 4); - a.add("fac_ani", 'a', "", false, 3); - a.add("v1", '\0', "", false, 1); - a.add("v2", '\0', "", false, 1); - a.add("cycle", 'c', "", false, 1); - a.add("mod_pk", '\0', "", false, 0); - a.add("compute_rho", '\0', "", false, 0); - a.add("level", 'l', "", false, -1); - a.add("maxiter", '\0', "", false, 150); - a.add("theta_aniso", '\0', "", false, 0); - a.add("smoother", '\0', "", false, 3); - a.add("extrapolation", 'E', "", false, 0); - a.add("DirBC_Interior", '\0', "", false, 1); - a.add("divideBy2", '\0', "", false, 0); - a.add("prob", '\0', "", false, 5); - a.add("alpha_coeff", '\0', "", false, 0); - a.add("beta_coeff", '\0', "", false, 0); - a.add("verbose", '\0', "", false, 1); - a.add("openmp", '\0', "", false, 1); - a.add("res_norm", '\0', "", false, 3); - a.add("write_radii_angles", '\0', "", false, 0); - a.add("check_error", '\0', "", false, 1); + auto domain_geometry = std::make_unique(); + auto exact_solution = std::make_unique(); + auto coefficients = std::make_unique(); + auto boundary_conditions = std::make_unique(); + auto source_term = std::make_unique(); - a.add("R0", 'r', "", false, 1e-5); - a.add("R", 'R', "", false, 1.3); - a.add("kappa_eps", 'k', "", false, 42); - a.add("delta_e", 'd', "", false, 42); - a.add("tol_bound_check", 'e', "", false, 1e-8); - a.add("rel_red_conv", '\0', "", false, 1e-8); + GMGPolar solver(std::move(domain_geometry), std::move(coefficients), std::move(boundary_conditions), std::move(source_term)); + solver.setSolution(std::move(exact_solution)); - a.add("f_grid_r", '\0', "", false, ""); - a.add("f_grid_theta", '\0', "", false, ""); - a.add("f_sol_in", '\0', "", false, ""); - a.add("f_sol_out", '\0', "", false, ""); + solver.setParameters(argc, argv); - a.parse_check(argc, argv); + solver.setup(); - //std::cout << "Initializing parameters...\n"; - gyro::init_params(); + solver.solve(); - gyro::icntl[Param::verbose] = a.get("verbose"); - gyro::icntl[Param::openmp] = a.get("openmp"); - gyro::icntl[Param::optimized] = a.get("optimized"); - gyro::icntl[Param::matrix_free] = a.get("matrix_free"); - gyro::icntl[Param::debug] = a.get("debug"); - // gyro::icntl[Param::divideBy2] = a.get("divideBy2"); - gyro::icntl[Param::smoother] = a.get("smoother"); - gyro::dcntl[Param::rel_red_conv] = a.get("rel_red_conv"); + solver.printTimings(); - gyro::f_grid_r = a.get("f_grid_r"); - gyro::f_grid_theta = a.get("f_grid_theta"); - if (!gyro::f_grid_r.empty() || !gyro::f_grid_theta.empty()) { - std::cout << "File for grid in r: " << gyro::f_grid_r << ", and theta: " << gyro::f_grid_theta << "\n"; - } - gyro::f_sol_in = a.get("f_sol_in"); - gyro::f_sol_out = a.get("f_sol_out"); - if (!gyro::f_sol_in.empty() && gyro::icntl[Param::check_error]) { - std::cout << "Warning: an input solution has been provided but the error will not be checked\n"; - } - else if (!gyro::f_sol_in.empty()) { - std::cout << "File to read the solution vector: " << gyro::f_sol_in << "\n"; - } - if (!gyro::f_sol_out.empty()) { - std::cout << "File to write the solution vector: " << gyro::f_sol_in << "\n"; - } - - //////////////////////////////////////////////////////////////////////////////// - // DISPLAY OPENMP INFO - //////////////////////////////////////////////////////////////////////////////// - //Set number of threads for the openmp parallelization - omp_set_num_threads(gyro::icntl[Param::openmp]); - - if (gyro::icntl[Param::verbose] > 1) { -#pragma omp parallel - { -#pragma omp master - { - std::cout << "Number of OpenMP threads: " << NOMP << "\n"; - } - } - } - if (gyro::icntl[Param::verbose] > 1) { - -#pragma omp parallel - { -#pragma omp master - { - std::cout << "OMP_thread\tCPU\n"; - } -#pragma omp critical - { - std::cout << IOMP << "\t" << ICPU << "\n"; - } - } - std::cout << "\n"; - } - - // normal run, NO DEBUGGING - if (gyro::icntl[Param::debug] == 0) { - gyro::icntl[Param::nr_exp] = a.get("nr_exp"); - gyro::icntl[Param::ntheta_exp] = a.get("ntheta_exp"); - gyro::icntl[Param::fac_ani] = a.get("fac_ani"); - gyro::icntl[Param::v1] = a.get("v1"); - gyro::icntl[Param::v2] = a.get("v2"); - gyro::icntl[Param::cycle] = a.get("cycle"); - gyro::icntl[Param::mod_pk] = a.get("mod_pk"); - if (gyro::icntl[Param::mod_pk] == 42) - gyro::icntl[Param::mod_pk] = 0; - gyro::icntl[Param::compute_rho] = a.get("compute_rho"); - gyro::icntl[Param::level] = a.get("level"); - gyro::icntl[Param::maxiter] = a.get("maxiter"); - gyro::icntl[Param::theta_aniso] = a.get("theta_aniso"); - gyro::icntl[Param::extrapolation] = a.get("extrapolation"); - gyro::icntl[Param::DirBC_Interior] = a.get("DirBC_Interior"); - gyro::icntl[Param::divideBy2] = a.get("divideBy2"); - gyro::icntl[Param::prob] = a.get("prob"); - gyro::icntl[Param::alpha_coeff] = a.get("alpha_coeff"); - gyro::icntl[Param::beta_coeff] = a.get("beta_coeff"); - gyro::icntl[Param::res_norm] = a.get("res_norm"); - gyro::icntl[Param::write_radii_angles] = a.get("write_radii_angles"); - gyro::icntl[Param::check_error] = a.get("check_error"); - if (gyro::icntl[Param::extrapolation] >= 2 && gyro::icntl[Param::check_error] == 0) { - throw std::runtime_error("The alternative extrapolation technique requires to check the error, w.r.t. to " - "the theoretical solution, as stopping criterion."); - } - - gyro::dcntl[Param::R0] = a.get("R0"); - gyro::dcntl[Param::R] = a.get("R"); - gyro::dcntl[Param::kappa_eps] = a.get("kappa_eps"); - gyro::dcntl[Param::delta_e] = a.get("delta_e"); - - geometry_type geom = (geometry_type)gyro::icntl[Param::mod_pk]; - if (gyro::dcntl[Param::kappa_eps] == 42 && gyro::dcntl[Param::delta_e] == 42) { - gyro::get_geometry_coeffs(geom); - } - if (gyro::icntl[Param::verbose] > 2) - gyro::show_params(); - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - - //////////////////////////////////////////////////////////////////////////////// - // LAUNCH - //////////////////////////////////////////////////////////////////////////////// - double t; - TIC; - gmgpolar gmg; - try { - // Create polar grids - gmg.create_grid_polar(); - - if (gyro::icntl[Param::write_radii_angles] == 0) - // Solve using multigrid - gmg.polar_multigrid(); - } - catch (std::runtime_error const& e) { - std::cout << "Error code : " << e.what() << "\n"; - } - catch (...) { - std::cout - << "I felt a great disturbance in the Force, as if millions of voices suddenly cried out in terror " - "and were suddenly silenced. I fear something terrible has happened.\n"; - error = 1; - } - // if (gyro::icntl[Param::verbose] > 0) - std::cout << "Total execution time: " << TOC - << "\n---------------------------------------------------------------------------\n"; - } - - // DEBUGGING - else { - geometry_type geom; - clock_t t; - //////////////////////////////////////////////////////////////////////////////// - // LOOP PARAMETERS - //////////////////////////////////////////////////////////////////////////////// - // debug=1 - // nr_exp=4 - // ntheta_exp=4 - // fac_ani=3 - // divideBy2=0 - gyro::icntl[Param::nr_exp] = 4; - gyro::icntl[Param::ntheta_exp] = 4; - gyro::icntl[Param::fac_ani] = 3; - gyro::icntl[Param::divideBy2] = 0; - gyro::icntl[Param::verbose] = 0; - std::cout << "####################################################\n"; - std::cout << "GLOBAL PARAMETERS // nr_exp" << gyro::icntl[Param::nr_exp] - << ", ntheta_exp: " << gyro::icntl[Param::ntheta_exp] << ", fac_ani: " << gyro::icntl[Param::fac_ani] - << ", divideBy2: " << gyro::icntl[Param::divideBy2] << ", verbose: " << gyro::icntl[Param::verbose] - << "\n"; - std::cout << "####################################################\n"; - - // prob5+R1+mod_pk2+alpha1+beta1+optimized1+DirBC_Interior1+smoother3+extrapolation1: 1 - gyro::icntl[Param::prob] = 5; - gyro::dcntl[Param::R] = 1.0; - gyro::icntl[Param::mod_pk] = 2; - gyro::icntl[Param::alpha_coeff] = 1; - gyro::icntl[Param::beta_coeff] = 1; - gyro::icntl[Param::optimized] = 1; - gyro::icntl[Param::DirBC_Interior] = 1; - gyro::icntl[Param::smoother] = 3; - gyro::icntl[Param::extrapolation] = 1; - std::cout << "#################################################################################################" - "#######\n"; - std::cout << "TESTING DEFAULT CASE // prob" << gyro::icntl[Param::prob] << ", R: " << gyro::dcntl[Param::R] - << ", mod_pk: " << gyro::icntl[Param::mod_pk] << ", alpha_coeff: " << gyro::icntl[Param::alpha_coeff] - << ", beta_coeff: " << gyro::icntl[Param::beta_coeff] << ", optimized" - << gyro::icntl[Param::optimized] << ", DirBC_Interior: " << gyro::icntl[Param::DirBC_Interior] - << ", smoother: " << gyro::icntl[Param::smoother] - << ", extrapolation: " << gyro::icntl[Param::extrapolation] << "\n"; - std::cout << "#################################################################################################" - "#######\n"; - geom = (geometry_type)gyro::icntl[Param::mod_pk]; - gyro::get_geometry_coeffs(geom); - if (gyro::icntl[Param::verbose] > 2) - gyro::show_params(); - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - //////////////////////////////////////////////////////////////////////////////// - // LAUNCH - //////////////////////////////////////////////////////////////////////////////// - TIC; - gmgpolar gmg; - try { -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_START("create_grid_polar"); -} -#endif - // Create polar grids - gmg.create_grid_polar(); -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_STOP("create_grid_polar"); + return 0; } -#endif - // Solve using multigrid - gmg.polar_multigrid(); - } - catch (std::runtime_error const& e) { - std::cout << "Error code : " << e.what() << "\n"; - exit(1); - } - catch (...) { - std::cout << "I felt a great disturbance in the Force, as if millions of voices suddenly " - "cried out " - "in terror " - "and were suddenly silenced. I fear something terrible has happened.\n"; - error = 1; - } - if (gyro::icntl[Param::verbose] > 0) - std::cout << "Total execution time: " << TOC << "\n"; - - std::cout << "\n\n\n\n\n"; - - // prob5+R1+mod_pk2+alpha1+beta1: 6 - // optimized=0-1 - // DirBC_Interior=0-1 - // smoother=3,13 - // extrapolation=0-1 - gyro::icntl[Param::prob] = 5; - gyro::dcntl[Param::R] = 1.0; - gyro::icntl[Param::mod_pk] = 2; - gyro::icntl[Param::alpha_coeff] = 1; - gyro::icntl[Param::beta_coeff] = 1; - std::cout << "#################################################################################################" - "#######\n"; - std::cout << "TESTING MG PARAMETERS // prob" << gyro::icntl[Param::prob] << ", R: " << gyro::dcntl[Param::R] - << ", mod_pk: " << gyro::icntl[Param::mod_pk] << ", alpha_coeff: " << gyro::icntl[Param::alpha_coeff] - << ", beta_coeff: " << gyro::icntl[Param::beta_coeff] << "\n"; - std::cout << "#################################################################################################" - "#######\n"; - // for (int optimized = 0; optimized < 2; optimized++) { - for (int DirBC_Interior = 0; DirBC_Interior < 2; DirBC_Interior++) { - // for (int smoother = 3; smoother < 23; smoother += 10) { - for (int extrapolation = 0; extrapolation < 2; extrapolation++) { - // // int optimized = 1; - // int DirBC_Interior = 0; - // // int smoother = 3; - // int extrapolation = 1; - // gyro::icntl[Param::optimized] = optimized; - gyro::icntl[Param::DirBC_Interior] = DirBC_Interior; - // gyro::icntl[Param::smoother] = smoother; - gyro::icntl[Param::extrapolation] = extrapolation; - - geom = (geometry_type)gyro::icntl[Param::mod_pk]; - gyro::get_geometry_coeffs(geom); - if (gyro::icntl[Param::verbose] > 2) - gyro::show_params(); - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; - // std::cout << "opti: " << optimized << ", BC: " << DirBC_Interior << ", smoother: " << smoother - // << ", extrap: " << extrapolation << "\n"; - std::cout << "BC: " << DirBC_Interior << ", extrap: " << extrapolation << "\n"; - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; - - //////////////////////////////////////////////////////////////////////////////// - // LAUNCH - //////////////////////////////////////////////////////////////////////////////// - TIC; - gmgpolar gmg2; - try { - // Create polar grids - gmg2.create_grid_polar(); - - // Solve using multigrid - gmg2.polar_multigrid(); - } - catch (std::runtime_error const& e) { - std::cout << "Error code : " << e.what() << "\n"; - exit(1); - } - catch (...) { - std::cout << "I felt a great disturbance in the Force, as if millions of voices suddenly " - "cried out " - "in terror " - "and were suddenly silenced. I fear something terrible has happened.\n"; - error = 1; - } - if (gyro::icntl[Param::verbose] > 0) - std::cout << "Total execution time: " << TOC << "\n"; - } - // } - } - // } - - std::cout << "\n\n\n\n\n"; - - // optimized1+DirBC_Interior1+smoother3+extrapolation1: 32 - // R=1.0,1.3 - // prob=5-6 - // mod_pk=0-2(3) - // alpha_coeff=0-1 - // beta_coeff=0-1 - gyro::icntl[Param::optimized] = 1; - gyro::icntl[Param::DirBC_Interior] = 1; - gyro::icntl[Param::smoother] = 3; - gyro::icntl[Param::extrapolation] = 1; - std::cout << "#################################################################################################" - "#######\n"; - std::cout << "TESTING TEST CASES // optimized" << gyro::icntl[Param::optimized] - << ", DirBC_Interior: " << gyro::icntl[Param::DirBC_Interior] - << ", smoother: " << gyro::icntl[Param::smoother] - << ", extrapolation: " << gyro::icntl[Param::extrapolation] << "\n"; - std::cout << "#################################################################################################" - "#######\n"; - for (double R = 1.0; R < 1.6; R += 0.3) { - for (int prob = 5; prob < 7; prob++) { - for (int mod_pk = 0; mod_pk < 3; mod_pk++) { - for (int alpha_coeff = 0; alpha_coeff < 2; alpha_coeff++) { - for (int beta_coeff = 0; beta_coeff < 2; beta_coeff++) { - // double R = 1.0; - // int prob = 5; - // int mod_pk = 1; - // int alpha_coeff = 1; - // int beta_coeff = 1; - gyro::dcntl[Param::R] = R; - gyro::icntl[Param::prob] = prob; - gyro::icntl[Param::mod_pk] = mod_pk; - gyro::icntl[Param::alpha_coeff] = alpha_coeff; - gyro::icntl[Param::beta_coeff] = beta_coeff; - - geom = (geometry_type)gyro::icntl[Param::mod_pk]; - gyro::get_geometry_coeffs(geom); - if (gyro::icntl[Param::verbose] > 2) - gyro::show_params(); - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], - gyro::icntl[Param::beta_coeff], gyro::icntl[Param::mod_pk], - gyro::icntl[Param::prob]); - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; - std::cout << "R: " << R << ", prob: " << prob << ", mod_pk: " << mod_pk - << ", alpha_coeff: " << alpha_coeff << ", beta_coeff: " << beta_coeff << "\n"; - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; - - //////////////////////////////////////////////////////////////////////////////// - // LAUNCH - //////////////////////////////////////////////////////////////////////////////// - TIC; - gmgpolar gmg3; - try { - // Create polar grids - gmg3.create_grid_polar(); - - // Solve using multigrid - gmg3.polar_multigrid(); - } - catch (std::runtime_error const& e) { - std::cout << "Error code : " << e.what() << "\n"; - exit(1); - } - catch (...) { - std::cout - << "I felt a great disturbance in the Force, as if millions of voices suddenly " - "cried out " - "in terror " - "and were suddenly silenced. I fear something terrible has happened.\n"; - error = 1; - } - if (gyro::icntl[Param::verbose] > 0) - std::cout << "Total execution time: " << TOC << "\n"; - } - } - } - } - } - } - -#ifdef GMGPOLAR_USE_LIKWID - LIKWID_MARKER_CLOSE; -#endif - - return error; -} /* ----- end of main ----- */ diff --git a/src/multigrid_iter.cpp b/src/multigrid_iter.cpp deleted file mode 100644 index 4e5b960e..00000000 --- a/src/multigrid_iter.cpp +++ /dev/null @@ -1,910 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file multigrid_iter.cpp - * \brief Implementation of the multigrid scheme - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ - -#include "gmgpolar.h" -#include - -/*! - * \brief The multigrid cycle iterations - * - * The multigrid cycle iterations: calls gmgpolar::multigrid_iter_extrapol() - * - */ -void gmgpolar::multigrid_iter() -{ - double t; - TIC; - - int extrapol = gyro::icntl[Param::extrapolation]; - int nrm_res = gyro::icntl[Param::res_norm]; - - if (extrapol > 0) - v_level[1]->fVec_initial = v_level[1]->fVec; //Extrapolation: store the initial fVec on level 1 - if (gyro::icntl[Param::verbose] > 0) { - if (extrapol == 1) - std::cout << "with implicit extrapolation.\n"; - else if (extrapol == 2) - std::cout << "with alternative extrapolation.\n WARNING: Alternative extrapolation option is a pure test or research setting.\n"; - } - - int it = 0; - v_level[0]->u.assign(v_level[0]->m, 0); //zero u on level 0 (only once at the beginning) - - TIC; - - if (extrapol < 2) { - - //! compute the initial residual: res0 = f - A*u - compute_residual(0, extrapol); //compute residual on level 0 - //compute the 2 norm and inf-norm of the residual - nrm_2_res.push_back(0); //2norm of residual, store the residual norm on level 0 of every iteration - nrm_inf_res.push_back(0); - double nrm_inf_err_temp = 0; - - for (long unsigned int i = 0; i < v_level[0]->res.size(); ++i) { - nrm_2_res[0] += v_level[0]->res[i] * v_level[0]->res[i]; - - if (fabs(v_level[0]->res[i]) > nrm_inf_err_temp) { - nrm_inf_err_temp = fabs(v_level[0]->res[i]); - } - } - nrm_2_res[0] = sqrt(nrm_2_res[0]); - nrm_inf_res[0] = nrm_inf_err_temp; - - if (gyro::icntl[Param::verbose] > 0) { - std::cout << "initial residual: 2-norm = " << nrm_2_res[0] << "\n"; - std::cout << "initial residual: inf-norm = " << nrm_inf_res[0] << "\n"; - } - } - //ALternative extrapolation - else { - if (gyro::icntl[Param::check_error] == 0) - throw std::runtime_error("The alternative extrapolation technique requires to check the error, w.r.t. to " - "the theoretical solution, as stopping criterion."); - //! compute the initial error - std::vector error = compute_error(); - nrm_2_err.push_back(0); - for (std::size_t i = 0; i < error.size(); ++i) { //iterate over the grid in polar coordinates - nrm_2_err[0] += error[i] * error[i]; - } - nrm_2_err[0] = sqrt(nrm_2_err[0]) / sqrt(v_level[0]->m); //scaling by 1/sqrt(m) - if (gyro::icntl[Param::verbose] > 0) - std::cout << "initial error: 2-norm = " << nrm_2_err[0] << "\n"; - } - - double rel_red_conv = gyro::dcntl[Param::rel_red_conv]; //threshold on relative residual - double convergence_criterium = 1.0; - - t_fine_residual += TOC; - TIC; - -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_START("Iteration"); -} -#endif - //! Start the Multigrid-Iteration - while (it < gyro::icntl[Param::maxiter] && convergence_criterium > rel_red_conv) { - it++; - - //call the multigrid_cycle on level 0 (the finest level) - multigrid_cycle_extrapol(0); - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(v_level[0]->u, "u"); - - TIC; - //---------------------------------------------------------------------------------------------------------- - //! compute the convergence criterium - //use the residual as convergence criterium - if (extrapol < 2) { - gmgpolar::compute_residual(0, extrapol); //compute residual on level 0 - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(v_level[0]->res, "res"); - - nrm_2_res.push_back(0); - nrm_inf_res.push_back(0); - double nrm_inf_res_temp = 0; - - for (unsigned long int i = 0; i < v_level[0]->res.size(); ++i) { - nrm_2_res[it] += v_level[0]->res[i] * v_level[0]->res[i]; - - if (fabs(v_level[0]->res[i]) > nrm_inf_res_temp) { - nrm_inf_res_temp = fabs(v_level[0]->res[i]); - } - } - nrm_2_res[it] = sqrt(nrm_2_res[it]); - nrm_inf_res[it] = nrm_inf_res_temp; - - // * Defines the norm used for the residual in the stopping criterion - // * 0: - // * 1: - // * 2: - // * 3: - if (nrm_res == 0) { // L2 norm scaled by initial res. - convergence_criterium = nrm_2_res[it] / nrm_2_res[0]; - } - else if (nrm_res == 1) { // Infinitiy norm scaled by initial res. - convergence_criterium = nrm_inf_res[it] / nrm_inf_res[0]; - } - else if (nrm_res == 2) { // L2 norm - convergence_criterium = nrm_2_res[it]; - } - else if (nrm_res == 3) { // Infinitiy norm - convergence_criterium = nrm_inf_res[it]; - } - - if (gyro::icntl[Param::verbose] > 1) - std::cout << "--> Iteration " << it << ": residual norm = " << nrm_2_res[it] - << ", relative residual = " << convergence_criterium << std::endl; - } - //Alternative extrapolation: use error instead of residual as convergence criterium - else { - if (gyro::icntl[Param::check_error] == 0) - throw std::runtime_error( - "The alternative extrapolation technique requires to check the error, w.r.t. to " - "the theoretical solution, as stopping criterion."); - - std::vector error = compute_error(); - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(error, "error"); - - nrm_2_err.push_back(0); - for (std::size_t i = 0; i < error.size(); ++i) { //iterate over the grid in polar coordinates - nrm_2_err[it] += error[i] * error[i]; - } - nrm_2_err[it] = sqrt(nrm_2_err[it]) / sqrt(v_level[0]->m); //scaling by 1/sqrt(m) - - double error_difference = fabs(nrm_2_err[it] - nrm_2_err[it - 1]); - convergence_criterium = error_difference / nrm_2_err[0]; - - if (gyro::icntl[Param::verbose] > 1) - std::cout << "--> Iteration " << it << ": error norm = " << nrm_2_err[it] - << ", relative error = " << convergence_criterium << std::endl; - } - t_fine_residual += TOC; - TIC; - } -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_STOP("Iteration"); -} -#endif - if (gyro::icntl[Param::verbose] > 0) { - if (it == gyro::icntl[Param::maxiter]) { - std::cout << "Multigrid reached maxiter=" << gyro::icntl[Param::maxiter] << "\n"; - } - else { - std::cout << "Convergence after iteration " << it << std::endl; - } - } - //---------------------------------------------------------------------------------------------------------- - //!compute mean residual reduction factor rho - if (extrapol < 2) { - double rho_mean = std::pow(convergence_criterium, 1.0 / it); //take the it-th root (it=number of iterations) - std::cout << "mean residual reduction factor: rho = " << rho_mean << std::endl; - } - - if (!gyro::f_sol_out.empty()) { - v_level[0]->write_sol(); - } - - TIC; - if (gyro::icntl[Param::check_error] == 1) { - //compute the error in the 2-norm and inf-norm - std::vector error = compute_error(); - double nrm_inf_err = 0; - double nrm_2 = 0; - for (std::size_t i = 0; i < error.size(); ++i) { //iterate over the grid in polar coordinates - nrm_2 += error[i] * error[i]; - if (fabs(error[i]) > nrm_inf_err) { - nrm_inf_err = fabs(error[i]); - } - } - nrm_2 = sqrt(nrm_2) / sqrt(v_level[0]->m); //scaling by 1/sqrt(m) - - if (gyro::icntl[Param::verbose] > 0) { - std::cout << "2-norm of error = " << nrm_2 << std::endl; - std::cout << "inf-norm of error = " << nrm_inf_err << std::endl; - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(error, "error"); - } - - t_error += TOC; - TIC; - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(v_level[0]->u, "u"); -} /* ----- end of gmgpolar::multigrid_iter ----- */ - -/*! - * \brief Multigrid iterations on level l - * - * Multigrid iterations on level l - * - * \param l: the level (0=finest) - * - */ -void gmgpolar::multigrid_cycle_extrapol(int l) -{ - //l = current level we are on (from class level) - if (gyro::icntl[Param::verbose] > 4) { - std::cout << "********************************************" << std::endl; - std::cout << "MULTIGRID ON LEVEL " << l << std::endl; - std::cout << "nr = " << v_level[l]->nr << ", ntheta = " << v_level[l]->ntheta << std::endl; - std::cout << "********************************************" << std::endl; - } - - //time measuring - double t, t_total_tmp, t_smoothing_tmp; - TIC; - t_total_tmp = t; - t_smoothing_tmp = t; - - int extrapol = gyro::icntl[Param::extrapolation]; - int s = 0; - int c = 0; - int smoother = 0; - std::vector> f_Asc_u = std::vector>(4, std::vector()); - - TIC; - //! v1 presmoothing steps (on level l) - for (int v = 0; v < gyro::icntl[Param::v1]; ++v) { - for (smoother = 0; smoother < 4; smoother++) { - int size = 0, size_ortho = 0; - if (smoother < 2) { - size_ortho = v_level[l]->delete_circles + 1; - size = v_level[l]->delete_circles; - } - else if (smoother > 1) { - size_ortho = v_level[l]->ntheta_int; - size = v_level[l]->ntheta_int; - } - for (int i = 0; i < size_ortho; i++) - v_level[l]->dep_Asc_ortho[smoother][i] = 0; - for (int i = 0; i < size; i++) - v_level[l]->dep_Asc[smoother][i] = 0; - } - - if (gyro::icntl[Param::optimized] == 0) { - // iterate over the 4 smoothers (0:c/b, 1:c/w, 2:r/b, 3:r/w) - for (int smoother = 0; smoother < 4; smoother++) { - TIC; - - //call the smooothing function, the result is u_sc which is directly inserted into u - v_level[l]->multigrid_smoothing0(smoother); - - if (gyro::icntl[Param::verbose] > 4) - std::cout << "Finishing running of pre-smoother: " << smoother << " (" << TOC << " s)\n"; - } - } - else { - // Initialize vectors to contain Asc_ortho.u (required for OpenMP, else adresses change between threads) - for (smoother = 0; smoother < 4; smoother++) - f_Asc_u[smoother] = std::vector(v_level[l]->nblocks[smoother] * v_level[l]->m_sc[smoother], 0); - - //call the smooothing function, the result is u_sc which is directly inserted into u -#pragma omp parallel firstprivate(v, s, c, smoother) shared(f_Asc_u) - { -#pragma omp single - { - for (s = 0; s < 2; s++) { - // iterate over the 4 smoothers (0:c/b, 1:c/w, 2:r/b, 3:r/w) - for (c = 0; c < 2; c++) { - int smoother = s * 2 + c; - TIC; - int sm = (smoother < 2) ? 1 - smoother : 5 - smoother; - v_level[l]->multigrid_smoothing( - smoother, v, f_Asc_u[smoother], v_level[l]->nblocks[smoother], c, - v_level[l]->dep_Asc[smoother], v_level[l]->dep_Asc[sm], v_level[l]->dep_Asc[1], - v_level[l]->dep_Asc_ortho[smoother]); - - if (gyro::icntl[Param::verbose] > 4) - std::cout << "Finishing running of pre-smoother: " << smoother << " (" << TOC << " s)\n"; - } - } - } // omp single - } // omp parallel - } - - if (gyro::icntl[Param::smoother] == 13) { - //create the current solution u from the two vectors u_previous - //int number_circle_points = v_level[l]->m_sc[0] + v_level[l]->m_sc[1]; //does not work for extrapolation - int number_circle_points = v_level[l]->delete_circles * v_level[l]->ntheta; - for (int i = 0; i < number_circle_points; ++i) { - v_level[l]->u[i] = v_level[l]->u_previous_c[i]; //insert values from the circle smoother - } - for (int i = number_circle_points; i < v_level[l]->m; ++i) { - v_level[l]->u[i] = v_level[l]->u_previous_r[i]; //insert values from the radial smoother - } - } - } - //std::cout << "pre-smoothing done \n"; - - t = t_smoothing_tmp; - t_smoothing += TOC; - - if (gyro::icntl[Param::verbose] > 5){ // no timing of large output - gyro::disp(v_level[l]->u, "u"); - } - - TIC; - - //! compute residual (of level l) - //even if we have extrapolation, compute just normal residual (extrapolation-restriction follows in the next step) - gmgpolar::compute_residual(l, 0); - - t_residual += TOC; - - if (gyro::icntl[Param::verbose] > 5){ // no timing of large output - gyro::disp(v_level[l]->res, "res"); - } - - TIC; - - //! Restriction of residual (coarsening) - //the restricted residual of level l becomes the right hand side on level l+1, f(l+1)=res_coarse(l) - if (extrapol > 0 && l == 0) { //for extrapol = 1 and extrapol = 2 - std::vector res_1; - //res_1 = P_ex^T * res - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - res_1 = v_level[l]->apply_prolongation_ex0(v_level[l]->res, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 1); - } - else { - res_1 = v_level[l]->apply_restriction_ex(v_level[l]->res); - } - } - else { - res_1 = std::vector(v_level[l]->mc, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_ex.size(); i++) { - res_1[v_level[l]->ci_prol_ex[i]] += - v_level[l]->v_prol_ex[i] * v_level[l]->res[v_level[l]->ri_prol_ex[i]]; - } - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(res_1, "res_1"); - - //Au_coarse = A(l+1) * u_coarse = A(l+1) * P_inj^T * u(l) - std::vector Au_coarse(v_level[l + 1]->m, 0); //result of apply_A(u_coarse), empty vector - - std::vector u_coarse; - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - u_coarse = v_level[l]->apply_prolongation_inj0(v_level[l]->u, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 1); - } - else { - u_coarse = v_level[l]->apply_restriction_inj(v_level[l]->u); - } - } - else { - u_coarse = std::vector(v_level[l]->mc, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_inj.size(); i++) { - u_coarse[v_level[l]->ci_prol_inj[i]] += - v_level[l]->v_prol_inj[i] * v_level[l]->u[v_level[l]->ri_prol_inj[i]]; - } - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(u_coarse, "u_coarse"); - - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) - { - v_level[l + 1]->apply_A0(u_coarse, Au_coarse); - }else{ - double start = omp_get_wtime(); - v_level[l + 1]->apply_A(u_coarse, Au_coarse); - double end = omp_get_wtime(); - t_applyA += (end - start); - } - } - else { - if (gyro::icntl[Param::openmp] == 1) { - for (size_t i = 0; i < v_level[l + 1]->row_indices.size(); i++) { - Au_coarse[v_level[l + 1]->row_indices[i]] += - v_level[l + 1]->vals[i] * u_coarse[v_level[l + 1]->col_indices[i]]; - } - } - else { - int j; -#pragma omp parallel for private(j) firstprivate(u_coarse) shared(Au_coarse) - for (j = 0; j < v_level[l + 1]->nr; j++) { - std::vector ptr_vect = v_level[l + 1]->get_ptr(j); - int ptr_start = ptr_vect[1]; - int ptr_end = ptr_start + (ptr_vect[2] - ptr_vect[1]) * v_level[l + 1]->ntheta_int; - for (int k = ptr_start; k < ptr_end; k++) { - Au_coarse[v_level[l + 1]->row_indices[k]] += - v_level[l + 1]->vals[k] * u_coarse[v_level[l + 1]->col_indices[k]]; - } - } - } - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(Au_coarse, "Au_coarse"); - - // f(l+1) = 4/3 * res_1 - 1/3 * (f(l+1) - Au_coarse) - for (unsigned long int i = 0; i < res_1.size(); ++i) { - v_level[l + 1]->fVec[i] = 4. / 3. * res_1[i] - 1. / 3. * (v_level[l + 1]->fVec_initial[i] - Au_coarse[i]); - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(v_level[l + 1]->fVec, "fVec"); - } - else { //no extrapolation - //res(l+1)=P^T*res(l) //trans=1 (Restriction, P^T) - //P=(ncoarse*mc), ncoarse=m(size of fine level), mc(size of coarse level), coarse_r=coarse_nodes_list_r - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) - v_level[l + 1]->fVec = v_level[l]->apply_prolongation_bi0( - v_level[l]->res, v_level[l]->mc, v_level[l]->m, v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 1); - else - v_level[l + 1]->fVec = v_level[l]->apply_restriction_bi(v_level[l]->res); - } - else { - v_level[l + 1]->fVec = std::vector(v_level[l]->mc, 0); - for (size_t i = 0; i < v_level[l]->ri_prol.size(); i++) { - v_level[l + 1]->fVec[v_level[l]->ci_prol[i]] += - v_level[l]->v_prol[i] * v_level[l]->res[v_level[l]->ri_prol[i]]; - } - } - } - //std::cout << "residual restricted \n"; - t_restriction += TOC; - TIC; - - //! recursive call of multigrid_cycle_extrapol - v_level[l + 1]->u.assign(v_level[l + 1]->m, 0); // zero u in every iteration - std::vector error_coarse; - if (l == levels - 2) { - // exact solve on the coarsest level for the error (A * error = res) (use whole A from coarsest level) - // check for the second to coarsest level (levels-2), as no smoothing on the coarsest level exists - // (and thus no Asc and no Asc_ortho) -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - error_coarse = v_level[l + 1]->solve_gaussian_elimination( - v_level[l + 1]->row_Ac_LU, v_level[l + 1]->col_Ac_LU, v_level[l + 1]->vals_Ac_LU, v_level[l + 1]->fVec); -#ifdef GMGPOLAR_USE_MUMPS - } - else - error_coarse = v_level[l + 1]->solve_mumps(v_level[l + 1]->mumps_Ac, v_level[l + 1]->fVec); -#endif - t_Ac += TOC; - TIC; - } - else { - multigrid_cycle_extrapol(l + 1); - error_coarse = v_level[l + 1]->u; // the coarse_error on level l is u on level l+1 - TIC; - } - - if (gyro::icntl[Param::verbose] > 4) { - std::cout << "********************************************" << std::endl; - std::cout << "BACK ON LEVEL " << l << std::endl; - std::cout << "********************************************" << std::endl; - } - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(error_coarse, "error_coarse"); - - TIC; - //! Prolongation of error_coarse to error_fine - //error(l) = P * error(l+1) - std::vector error_fine; - if (extrapol > 0 && l == 0) { //for extrapol = 1 and extrapol = 2 - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - error_fine = v_level[l]->apply_prolongation_ex0(error_coarse, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - } - else { - error_fine = v_level[l]->apply_prolongation_ex(error_coarse); - } - } - else { - error_fine = std::vector(v_level[l]->m, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_ex.size(); i++) { - error_fine[v_level[l]->ri_prol_ex[i]] += - v_level[l]->v_prol_ex[i] * error_coarse[v_level[l]->ci_prol_ex[i]]; - } - } - } - else { //no extrapolation - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) - error_fine = v_level[l]->apply_prolongation_bi0(error_coarse, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - else - error_fine = v_level[l]->apply_prolongation_bi(error_coarse); - } - else { - error_fine = std::vector(v_level[l]->m, 0); - for (size_t i = 0; i < v_level[l]->ri_prol.size(); i++) { - error_fine[v_level[l]->ri_prol[i]] += v_level[l]->v_prol[i] * error_coarse[v_level[l]->ci_prol[i]]; - } - } - } - //std::cout << "error prolongated \n"; - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(error_fine, "error_fine"); - - //! correction of solution (on level l) - //u += error - for (long unsigned int i = 0; i < error_fine.size(); ++i) { - v_level[l]->u[i] += error_fine[i]; - } - //std::cout << "solution corrected \n"; - t_prolongation += TOC; - TIC; - - t_smoothing_tmp = t; - - //! v2 postsmoothing steps (on level l) - for (int v = 0; v < gyro::icntl[Param::v2]; ++v) { - for (int smoother = 0; smoother < 4; smoother++) { - int size = 0, size_ortho = 0; - if (smoother < 2) { - size_ortho = v_level[l]->delete_circles + 1; - size = v_level[l]->delete_circles; - } - else if (smoother > 1) { - size_ortho = v_level[l]->ntheta_int; - size = v_level[l]->ntheta_int; - } - for (int i = 0; i < size_ortho; i++) - v_level[l]->dep_Asc_ortho[smoother][i] = 0; - for (int i = 0; i < size; i++) - v_level[l]->dep_Asc[smoother][i] = 0; - } - - //std::cout << "smoothing ... \n"; - if (gyro::icntl[Param::optimized] == 0) { - // iterate over the 4 smoothers (0:c/b, 1:c/w, 2:r/b, 3:r/w) - for (int smoother = 0; smoother < 4; smoother++) { - TIC; - - //call the smooothing function, the result is u_sc which is directly inserted into u - v_level[l]->multigrid_smoothing0(smoother); - - if (gyro::icntl[Param::verbose] > 4) - std::cout << "Finishing running of post-smoother: " << smoother << " (" << TOC << " s)\n"; - } - } - else { - // Initialize vectors to contain Asc_ortho.u (required for OpenMP, else adresses change between threads) - for (smoother = 0; smoother < 4; smoother++) - f_Asc_u[smoother] = std::vector(v_level[l]->nblocks[smoother] * v_level[l]->m_sc[smoother], 0); - - //call the smooothing function, the result is u_sc which is directly inserted into u -#pragma omp parallel firstprivate(v, s, c, smoother) shared(f_Asc_u) - { -#pragma omp single - { - for (s = 0; s < 2; s++) { - // iterate over the 4 smoothers (0:c/b, 1:c/w, 2:r/b, 3:r/w) - for (c = 0; c < 2; c++) { - int smoother = s * 2 + c; - TIC; - int sm = (smoother < 2) ? 1 - smoother : 5 - smoother; - v_level[l]->multigrid_smoothing( - smoother, v, f_Asc_u[smoother], v_level[l]->nblocks[smoother], c, - v_level[l]->dep_Asc[smoother], v_level[l]->dep_Asc[sm], v_level[l]->dep_Asc[1], - v_level[l]->dep_Asc_ortho[smoother]); - - if (gyro::icntl[Param::verbose] > 4) - std::cout << "Finishing running of post-smoother: " << smoother << " ( " << TOC << " s)\n"; - } - } - } // omp single - } // omp parallel - } - } - //std::cout << "post-smoothing done \n"; - t = t_smoothing_tmp; - t_smoothing += TOC; - TIC; - - t = t_total_tmp; - t_total_mgcycle += TOC; - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(v_level[l]->u, "u"); -} /* ----- end of gmgpolar::multigrid_cycle_extrapol ----- */ - -/*! - * \brief Computes the residual - * - * Computes the residual based on the approximation res = b-Au - * - * \param l: the level (0=finest) - * \param extrapol: l==0 and gyro::icntl[Param::extrapolation] - * - */ -void gmgpolar::compute_residual(int l, int extrapol) -{ - //std::cout << "compute residual function" << std::endl; - - //compute Au = A*u - std::vector Au(v_level[l]->m, 0); - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) - v_level[l]->apply_A0(v_level[l]->u, Au); - else { - double start = omp_get_wtime(); - v_level[l]->apply_A(v_level[l]->u, Au); - double end = omp_get_wtime(); - t_applyA += (end - start); - } - } - else { - if (gyro::icntl[Param::openmp] == 1) { - for (size_t i = 0; i < v_level[l]->row_indices.size(); i++) { - Au[v_level[l]->row_indices[i]] += v_level[l]->vals[i] * v_level[l]->u[v_level[l]->col_indices[i]]; - } - } - else { - int j; -#pragma omp parallel for private(j) shared(Au) - for (j = 0; j < v_level[l]->nr; j++) { - std::vector ptr_vect = v_level[l]->get_ptr(j); - int ptr_start = ptr_vect[1]; - int ptr_end = ptr_start + (ptr_vect[2] - ptr_vect[1]) * v_level[l]->ntheta_int; - for (int k = ptr_start; k < ptr_end; k++) { - Au[v_level[l]->row_indices[k]] += v_level[l]->vals[k] * v_level[l]->u[v_level[l]->col_indices[k]]; - } - } - } - } - - //set res(l) = f(l) - v_level[l]->res = v_level[l]->fVec; - - //Extrapolation (extrapol = 1) - if (extrapol == 1) { - //apply P to f(l+1): Pf = prolong_inj * f(l+1) - std::vector Pf; - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - Pf = v_level[l]->apply_prolongation_inj0(v_level[l + 1]->fVec_initial, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - } - else { - Pf = v_level[l]->apply_prolongation_inj(v_level[l + 1]->fVec_initial); - } - } - else { - Pf = std::vector(v_level[l]->m, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_inj.size(); i++) { - Pf[v_level[l]->ri_prol_inj[i]] += - v_level[l]->v_prol_inj[i] * v_level[l + 1]->fVec_initial[v_level[l]->ci_prol_inj[i]]; - } - } - - //apply P^T to u (restriction) - std::vector Pu; - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - Pu = v_level[l]->apply_prolongation_inj0(v_level[l]->u, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 1); - } - else { - Pu = v_level[l]->apply_restriction_inj(v_level[l]->u); - } - } - else { - Pu = std::vector(v_level[l]->mc, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_inj.size(); i++) { - Pu[v_level[l]->ci_prol_inj[i]] += v_level[l]->v_prol_inj[i] * v_level[l]->u[v_level[l]->ri_prol_inj[i]]; - } - } - - //apply A(l+1) to Pu - std::vector APu(v_level[l + 1]->m, 0); - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - v_level[l + 1]->apply_A0(Pu, APu); //APu = A(l+1) * Pu - } - else { - double start = omp_get_wtime(); - v_level[l + 1]->apply_A(Pu, APu); //APu = A(l+1) * Pu - double end = omp_get_wtime(); - t_applyA += (end - start); - } - } - else { - if (gyro::icntl[Param::openmp] == 1) { - for (size_t i = 0; i < v_level[l + 1]->row_indices.size(); i++) { - APu[v_level[l + 1]->row_indices[i]] += v_level[l + 1]->vals[i] * Pu[v_level[l + 1]->col_indices[i]]; - } - } - else { - int j; -#pragma omp parallel for private(j) shared(APu) - for (j = 0; j < v_level[l + 1]->nr; j++) { - std::vector ptr_vect = v_level[l + 1]->get_ptr(j); - int ptr_start = ptr_vect[1]; - int ptr_end = ptr_start + (ptr_vect[2] - ptr_vect[1]) * v_level[l + 1]->ntheta_int; - for (int k = ptr_start; k < ptr_end; k++) { - APu[v_level[l + 1]->row_indices[k]] += - v_level[l + 1]->vals[k] * Pu[v_level[l + 1]->col_indices[k]]; - } - } - } - } - - //apply P to APu (prolongation) - std::vector PAPu; - if (gyro::icntl[Param::matrix_free] == 1) { - if (gyro::icntl[Param::optimized] == 0) { - PAPu = v_level[l]->apply_prolongation_inj0(APu, v_level[l]->mc, v_level[l]->m, - v_level[l]->coarse_nodes_list_r, - v_level[l]->coarse_nodes_list_theta, 0); - } - else { - PAPu = v_level[l]->apply_prolongation_inj(APu); - } - } - else { - PAPu = std::vector(v_level[l]->m, 0); - for (size_t i = 0; i < v_level[l]->ri_prol_inj.size(); i++) { - PAPu[v_level[l]->ri_prol_inj[i]] += v_level[l]->v_prol_inj[i] * APu[v_level[l]->ci_prol_inj[i]]; - } - } - - //res_ex = 4/3 * f(l) - 1/3 * f_1 - 4/3 * Au - 1/3 *PAPu - for (int i = 0; i < v_level[l]->m; ++i) { - v_level[l]->res[i] = - (4. / 3. * v_level[l]->fVec[i] - 1. / 3. * Pf[i]) - (4. / 3. * Au[i] - 1. / 3. * PAPu[i]); - } - } - //no extrapolation - else { - //compute res = f - A * u - for (unsigned long int i = 0; i < v_level[l]->res.size(); ++i) { - v_level[l]->res[i] -= Au[i]; //res(l) = res(l) - Au = f(l) - A*u - } - } -} /* ----- end of gmgpolar::compute_residual ----- */ - -/*! - * \brief Computes the error - * - * Computes the error compared to the theoretical solution and sclaed by its norm - * - * \return the error vector - * - */ -std::vector gmgpolar::compute_error() -{ - //compute the error vector (on level 0) between the computed and the analytical solution - std::vector error; - - int ntheta_int = v_level[0]->ntheta; - if (fabs(v_level[0]->theta[v_level[0]->ntheta - 1] - 2 * PI) < 1e-10) { - ntheta_int--; - } - - if (gyro::f_sol_in.empty()) { - for (int j = 0; j < v_level[0]->nr; ++j) { //iterate over the grid in polar coordinates - for (int i = 0; i < ntheta_int; ++i) { - int index = j * ntheta_int + i; //corresponding index of the solution vector - //double x; - //double y; - double theoretical_solution = - gyro::def_solution_rt(v_level[0]->r[j], v_level[0]->theta[i], 0); //compute the theoretical solution - double computed_solution = v_level[0]->u[index]; - error.push_back(fabs(theoretical_solution - computed_solution)); - } - } - } - else { - for (int j = 0; j < v_level[0]->nr; ++j) { //iterate over the grid in polar coordinates - for (int i = 0; i < ntheta_int; ++i) { - int index = j * ntheta_int + i; //corresponding index of the solution vector - double theoretical_solution = v_level[0]->sol_in[index]; - double computed_solution = v_level[0]->u[index]; - error.push_back(fabs(theoretical_solution - computed_solution)); - } - } - } - - return error; -} /* ----- end of gmgpolar::compute_error ----- */ - -/*! - * \brief Compute the backward error on level 0 - * - * Compute the backward error on level 0: - * ||b-Au||_inf / (||A||_inf ||x||_1 + ||b||_inf) - * - * \return the backward error - * - */ -double gmgpolar::compute_backwarderror() -{ - gmgpolar::compute_residual(0, 0); //compute residual on level 0, without extrapolation, save in v_level[0]->res - - double nrm_inf_res = 0; //inf norm of res=A*u -fVec - for (std::size_t i = 0; i < v_level[0]->res.size(); ++i) { //iterate over the grid in polar coordinates - if (fabs(v_level[0]->res[i]) > nrm_inf_res) { - nrm_inf_res = fabs(v_level[0]->res[i]); - } - } - - double nrm_inf_rhs = 0; //inf norm of the rhs-vector - for (std::size_t i = 0; i < v_level[0]->fVec.size(); ++i) { //iterate over the grid in polar coordinates - if (fabs(v_level[0]->fVec[i]) > nrm_inf_rhs) { - nrm_inf_rhs = fabs(v_level[0]->fVec[i]); - } - } - - double nrm_1_u = 0; //1-norm of the solution vector - for (std::size_t i = 0; i < v_level[0]->u.size(); ++i) { //iterate over the grid in polar coordinates - nrm_inf_rhs += fabs(v_level[0]->u[i]); - } - - double nrm_inf_A = 0; //inf norm of the operator A - double row_sum = 0; - int row_index = 0; - for (std::size_t i = 0; i < v_level[0]->vals.size(); ++i) { //iterate over all elements in A - if (v_level[0]->row_indices[i] == row_index) { //we are still in the same row of the matrix - row_sum += fabs(v_level[0]->vals[i]); - } - else { //we just started a new row of the matrix - if (nrm_inf_A < row_sum) { - nrm_inf_A = row_sum; - } - row_sum = 0; //set row_sum to zero again - row_index = v_level[0]->row_indices[i]; //save the last row_index to compare - } - } - - double backward_error = nrm_inf_res / (nrm_inf_A * nrm_1_u + nrm_inf_rhs); - - return backward_error; -} /* ----- end of gmgpolar::compute_backwarderror ----- */ diff --git a/src/polar_multigrid.cpp b/src/polar_multigrid.cpp deleted file mode 100644 index 3f701c43..00000000 --- a/src/polar_multigrid.cpp +++ /dev/null @@ -1,649 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -/*! - * \file polar_multigrid.cpp - * \brief Implementation of the whole gmgpolar (grid + multigrid) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "gmgpolar.h" -#include -#include -#include -#include - -template -void getrands(std::vector& x, Generator& gen, unsigned num) -{ - generate_n(std::back_inserter(x), num, ref(gen)); -} - -/*! - * \brief Solves the problem gyro with multigrid on levels - * - * Solves the problem gyro with multigrid on levels - * - */ -void gmgpolar::polar_multigrid() -{ - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Define the coarse grid nodes...\n"; - check_geom(); - define_coarse_nodes(); - - if (gyro::icntl[Param::verbose] > 2) { - std::cout << "\n"; - if (gyro::icntl[Param::prob] == 1) - std::cout << "Solving the Poisson equation "; - else if (gyro::icntl[Param::prob] == 5) - std::cout << "Solving the Cartesian problem (from Zoni2019) "; - else if (gyro::icntl[Param::prob] == 6) - std::cout << "Solving the Poloidal problem "; - if (gyro::icntl[Param::alpha_coeff] == 0) - std::cout << "with coefficient alpha in atan (Sonnendrucker) "; - else if (gyro::icntl[Param::alpha_coeff] == 1) - std::cout << "with coefficient alpha in exp(tanh) and steep variation at 0.5 "; - else if (gyro::icntl[Param::alpha_coeff] == 2) - std::cout << "with coefficient alpha in exp(tanh) (Zoni2019) and variation at 0.7 "; - if (gyro::icntl[Param::beta_coeff] == 0) - std::cout << "and coefficient beta=0\n"; - else if (gyro::icntl[Param::beta_coeff] == 1) - std::cout << "and coefficient beta=1/alpha\n"; - if (!gyro::icntl[Param::mod_pk]) - std::cout << "Considering POLAR coordinates with "; - else if (gyro::icntl[Param::mod_pk] == 1) - std::cout << "Considering the Shafranov geometry with kappa=" << gyro::dcntl[Param::kappa_eps] - << ", delta=" << gyro::dcntl[Param::delta_e] << ", and "; - else if (gyro::icntl[Param::mod_pk] == 2) - std::cout << "Considering the Czarny geometry with kappa=" << gyro::dcntl[Param::kappa_eps] - << ", delta=" << gyro::dcntl[Param::delta_e] << ", and "; - std::cout << gyro::dcntl[Param::R0] << " <= r <= " << gyro::dcntl[Param::R] << "\n"; - std::cout << "Using 9 point star FINITE DIFFERENCES.\n"; - std::cout << "Using FULL EXTRAPOLATION\n\n"; - } - - gyro::dcntl[Param::r0_DB] = -1e6; - if (gyro::icntl[Param::DirBC_Interior]) - gyro::dcntl[Param::r0_DB] = gyro::dcntl[Param::R0]; - - int testA = 0; - if (testA) { - int testPerf = 0; - int display_vectors = 0; - int nb_tests = 10; - int l = 0; - v_level[l]->m = v_level[l]->nr * v_level[l]->ntheta; - v_level[l]->define_nz(); - int m = v_level[l]->m; - std::cout << "\n***** Problem size " << m << " (" << v_level[0]->nr << ", " << v_level[0]->ntheta << ")\n"; - - double t, t_applyA = 0, t_applyA0 = 0; - - for (int i = 0; i < nb_tests; i++) { - std::cout << "Test " << i << "\n"; - std::vector ei, uC(m, 0); - - std::uniform_real_distribution unif(0.0, 1.0); - std::mt19937 re(std::random_device{}()); - auto generator = std::bind(unif, std::ref(re)); - getrands(ei, generator, m); - if (display_vectors) - gyro::disp(ei, "ei"); - - // Apply A0 - if (!testPerf) { - TIC; - uC = std::vector(m, 0); - v_level[l]->apply_A0(ei, uC); - t_applyA0 += TOC; - if (display_vectors) - gyro::disp(uC, "uC (A0)"); - } - // Apply A - TIC; - uC = std::vector(m, 0); - v_level[l]->apply_A(ei, uC); - t_applyA += TOC; - if (display_vectors) - gyro::disp(uC, "uC (A)"); - } - if (!testPerf) - std::cout << "t_applyA0: " << t_applyA0 << std::endl; - std::cout << "t_applyA: " << t_applyA << std::endl; - } - else { - if (gyro::icntl[Param::verbose] > 3){ - std::cout - << "Building discretized system, restriction and interpolation operators, and defining splittings...\n"; - } -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_START("Setup"); -} -#endif - prepare_op_levels(); -#ifdef GMGPOLAR_USE_LIKWID -#pragma omp parallel -{ - LIKWID_MARKER_STOP("Setup"); -} -#endif - - int m = v_level[0]->m; - - std::string cycle_str = "?"; - if (gyro::icntl[Param::cycle] == 1) - cycle_str = "V"; - else if (gyro::icntl[Param::cycle] == 2) - cycle_str = "W"; - if (gyro::icntl[Param::verbose] > 2) { - std::cout << "\nProb: " << gyro::icntl[Param::prob] << ", alpha_coeff: " << gyro::icntl[Param::alpha_coeff] - << ", beta_coeff: " << gyro::icntl[Param::beta_coeff] << " ***** Problem size " << m << " (" - << v_level[0]->nr << ", " << v_level[0]->ntheta << "), " << levels - << " grids, nr_exp=" << gyro::icntl[Param::nr_exp] << ", aniso=" << gyro::icntl[Param::fac_ani] - << " ***** smoother=" << gyro::icntl[Param::smoother] << ", r0=" << gyro::dcntl[Param::R0] - << ", extrapolation=" << gyro::icntl[Param::extrapolation] - << ", mod_pk=" << gyro::icntl[Param::mod_pk] << ", DirBC=" << gyro::icntl[Param::DirBC_Interior] - << ", divide=" << gyro::icntl[Param::divideBy2] << " *****\n"; - } - - double scaling = 1.0; - if (gyro::icntl[Param::compute_rho]) - scaling = scaling / (sqrt(m)); - - v_level[0]->u.assign(m, scaling); //create an empty vector u - - if (gyro::icntl[Param::debug] > 0) { - debug(); - } - else if (gyro::icntl[Param::write_radii_angles] == 0) { - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Executing multigrid iteration....\n\n"; - multigrid_iter(); - - if (gyro::icntl[Param::verbose] > 1) { - for (int l = 0; l < levels; l++) { - std::cout << "LEVEL " << l << "\n"; - std::cout << "\tSmoothing: " << v_level[l]->t_smoothing << ", t_f_sc: " << v_level[l]->t_f_sc - << ", t_Asc_ortho: " << v_level[l]->t_Asc_ortho << ", t_Asc: " << v_level[l]->t_Asc - << "\n"; - std::cout << "\tt_get_ptr: " << v_level[l]->t_get_ptr - << ", t_get_stencil: " << v_level[l]->t_get_stencil - << ", t_get_smoother: " << v_level[l]->t_get_smoother - << ", t_get_row: " << v_level[l]->t_get_row; - std::cout << "\n"; - } - } - - if (gyro::icntl[Param::verbose] > 1) { - std::cout << "\nTotal setup: " << t_setup << "\n\tBuilding system matrix A and RHS: " << t_build - << "\n\tFactorization of coarse operator Ac: " << t_facto_Ac << "\n\tBuilding intergrid operators (e.g. projections): " << t_build_P - << "\n\tBuilding smoothing operators A_sc: " << t_build_Asc << "\n\tFactorizing smoothing operators A_sc: " << t_facto_Asc << "\n"; - std::cout << "Total multigrid cycle: " << t_total_mgcycle << "\n\tComplete smoothing: " << t_smoothing - << "\n\tComputing residual: " << t_residual << "\n\tApplying restriction: " << t_restriction - << "\n\tSolve coarse system: " << t_Ac << "\n\tApplying prolongation (+ coarse grid correction): " << t_prolongation - << "\nComputing residual on finest level: " << t_fine_residual; - if (gyro::icntl[Param::check_error] == 1) { - std::cout << "\nComputing final error: " << t_error; - } - std::cout << "\nTotal application of A: " << t_applyA; - std::cout << "\n"; - } - - if (gyro::icntl[Param::verbose] > 1) { - std::cout << "\nEvaluation of arr, art, and att: " << gyro::dcntl[Param::t_arr_art_att] - << "\n\tEvaluation of alpha and beta: " << gyro::dcntl[Param::t_coeff] - << "\n\tComputing determinant of Jacobian of inverse mapping: " << gyro::dcntl[Param::t_detDFinv]; - if (gyro::icntl[Param::check_error] == 1) { - std::cout << "\nComputing exact solution: " << gyro::dcntl[Param::t_sol]; - } - - std::cout << "\n"; - } - } - } -} /* ----- end of gmgpolar::polar_multigrid ----- */ - -/*! - * \brief Check the geometry construction - * - * Check the geometry construction - * - */ -void gmgpolar::check_geom() -{ - // intervals(!) not nodes in r direction (corresponds to nodes-1, - // i.e., without considering the origin which is here always defined - // as a node of the finest mesh only) - int ntheta = v_level[0]->ntheta - 1; - int nr = v_level[0]->nr - 1; - - if (gyro::icntl[Param::level] == -1 || gyro::icntl[Param::level] < 2) { - // at least two levels/grids.. and if more than two grids, at least 3 nodes - // per circle and per row on coarsest mesh!! - levels = std::max(2, (int)floor(std::min(log2(nr + 1) - 1, log2(ntheta + 2) - 1))); - } - else { - levels = gyro::icntl[Param::level]; - } - std::cout << "Desired number of levels: " << levels << "\n"; - - double Rmax = v_level[0]->r[nr]; - double R0 = v_level[0]->r[0]; - gyro::dcntl[Param::r0_DB] = -1; - if (R0 > 0) - gyro::dcntl[Param::r0_DB] = R0; - if (gyro::icntl[Param::verbose] > 2) - std::cout << "levels: " << levels << ", Rmax: " << Rmax << "\n"; - if (Rmax != gyro::dcntl[Param::R]) - throw std::runtime_error("Program stopped... r[end] != R..."); - if (R0 != gyro::dcntl[Param::R0]) - throw std::runtime_error("Program stopped... r[0] != R0..."); - if (gyro::dcntl[Param::extrapolation] > 0 && levels < 3) - throw std::runtime_error("ATTENTION: extrapolation technique needs at least three levels..."); -} /* ----- end of gmgpolar::polar_multigrid ----- */ - -/*! - * \brief Prepare the levels for operator construction - * - * Prepare the levels for operator construction - * - */ -void gmgpolar::prepare_op_levels() -{ - double t; - TIC; - t_setup = t; - - for (int l = levels - 1; l >= 0; l--) { //define m on the coarsest level - v_level[l]->m = v_level[l]->nr * v_level[l]->ntheta; - v_level[l]->define_nz(); - - v_level[l]->betaVec = std::vector(v_level[l]->m, 0); - v_level[l]->build_betaVec(); - - if (l < levels - 1) - v_level[l]->mc = v_level[l + 1]->m; - - if (l == 0 && !gyro::f_sol_in.empty()) { - v_level[0]->read_sol(); - } - - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Create operator on level " << l << "\n"; - if (l == levels - 1 || gyro::icntl[Param::matrix_free] == 0) { - TIC; - if (gyro::icntl[Param::optimized] == 0 || v_level[l]->nr_int < 2 + gyro::icntl[Param::DirBC_Interior]) { - std::cout << "Using the original construction of A and the RHS since nr_int is very " - "small.\n\n\n\n"; - v_level[l]->build_A0(); - v_level[l]->build_rhs0(); - } - else { - v_level[l]->row_indices = std::vector(v_level[l]->nz); - v_level[l]->col_indices = std::vector(v_level[l]->nz); - v_level[l]->vals = std::vector(v_level[l]->nz, 0); - v_level[l]->fVec = std::vector(v_level[l]->m); - v_level[l]->build_A(); - if (l == 0 || (l == 1 && gyro::icntl[Param::extrapolation] > 0)) { - v_level[l]->build_rhs(); - } - } - t_build += TOC; - TIC; - - if (l == levels - 1) { - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Factorizing coarse operator...\n"; - TIC; -#ifdef GMGPOLAR_USE_MUMPS - std::cout << "\n Using GMGPolar with MUMPS\n"; - if (gyro::icntl[Param::optimized] == 0) { -#else - std::cout << "\n Attention: Using GMGPolar without MUMPS (Coarse solve is very slow)\n"; -#endif - v_level[l]->row_Ac_LU = std::vector(v_level[l]->row_indices); - v_level[l]->col_Ac_LU = std::vector(v_level[l]->col_indices); - v_level[l]->vals_Ac_LU = std::vector(v_level[l]->vals); - v_level[l]->row_indices.clear(); - v_level[l]->col_indices.clear(); - v_level[l]->vals.clear(); - v_level[l]->row_indices.shrink_to_fit(); - v_level[l]->col_indices.shrink_to_fit(); - v_level[l]->vals.shrink_to_fit(); - v_level[l]->facto_gaussian_elimination(v_level[l]->row_Ac_LU, v_level[l]->col_Ac_LU, - v_level[l]->vals_Ac_LU, v_level[l]->m); -#ifdef GMGPOLAR_USE_MUMPS - } - else - v_level[l]->facto_mumps(v_level[l]->mumps_Ac, v_level[l]->row_indices, v_level[l]->col_indices, - v_level[l]->vals, v_level[l]->m); -#endif - t_facto_Ac += TOC; - } - TIC; - } - else { - TIC; - if (gyro::icntl[Param::optimized] == 0) - v_level[l]->build_rhs0(); - else { - v_level[l]->fVec = std::vector(v_level[l]->m); - if (l == 0 || (l == 1 && gyro::icntl[Param::extrapolation] > 0)) { - v_level[l]->build_rhs(); - } - } - t_build += TOC; - TIC; - } - - // Prolongation defined on all except the coarsest level - if (l < levels - 1) { - v_level[l]->define_line_splitting(); - if (gyro::icntl[Param::verbose] > 3) - std::cout << "delete_circles: " << v_level[l]->delete_circles << "\n"; - - // Number of blocks per smoother - v_level[l]->nblocks = std::vector(5); - v_level[l]->nblocks[0] = ceil(v_level[l]->delete_circles * 0.5); - v_level[l]->nblocks[1] = floor(v_level[l]->delete_circles * 0.5); - v_level[l]->nblocks[2] = v_level[l]->ntheta_int * 0.5; - v_level[l]->nblocks[3] = v_level[l]->nblocks[2]; - v_level[l]->nblocks[4] = std::max(v_level[l]->nblocks[0], v_level[l]->nblocks[2]); - - for (int smoother = 0; smoother < 4; smoother++) { - int size = 0, size_ortho = 0, *array_temp, *array_temp2; - if (smoother < 2) { - size_ortho = v_level[l]->delete_circles + 1; - size = v_level[l]->delete_circles; - } - else if (smoother > 1) { - size_ortho = v_level[l]->ntheta_int; - size = v_level[l]->ntheta_int; - } - array_temp = new int[size_ortho]; - for (int i = 0; i < size_ortho; i++) - array_temp[i] = 0; - array_temp2 = new int[size]; - for (int i = 0; i < size; i++) - array_temp2[i] = 0; - v_level[l]->dep_Asc_ortho.push_back(array_temp); - v_level[l]->dep_Asc.push_back(array_temp2); - v_level[l]->size_Asc_ortho.push_back(size_ortho); - v_level[l]->size_Asc.push_back(size); - } - - // Smoother matrices Asc - TIC; - //build matrices A_sc - if (gyro::icntl[Param::verbose] > 3) - std::cout << "build Asc on level " << l << ", m: " << v_level[l]->m << ", mc: " << v_level[l]->mc - << "\n"; - v_level[l]->define_m_nz_Asc(); - if (gyro::icntl[Param::optimized] == 0) { - v_level[l]->build_Asc0(); - } - else { - // 1 block matrix per row (column) for the circle (radial) smoother - for (int smoother = 0; smoother < 4; smoother++) { - v_level[l]->A_Zebra_r_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - v_level[l]->A_Zebra_c_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - v_level[l]->A_Zebra_v_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - for (int ij = 0; ij < v_level[l]->nblocks[smoother]; ij++) { - int nsc = v_level[l]->define_nz_Asc_ij(smoother, ij, 0); - v_level[l]->A_Zebra_r_row[smoother][ij] = std::vector(nsc); - v_level[l]->A_Zebra_c_row[smoother][ij] = std::vector(nsc); - v_level[l]->A_Zebra_v_row[smoother][ij] = std::vector(nsc, 0); - } - } - // define Asc blocks - v_level[l]->build_Asc(); - - if (gyro::icntl[Param::matrix_free] == 0) { - // 1 block matrix per row (column) for the circle (radial) smoother - v_level[l]->A_Zebra_Mix_r.assign(4, std::vector()); - v_level[l]->A_Zebra_Mix_c.assign(4, std::vector()); - v_level[l]->A_Zebra_Mix_v.assign(4, std::vector()); - for (int smoother = 0; smoother < 4; smoother++) { - int nsc = v_level[l]->nz_sc_ortho[smoother]; - v_level[l]->A_Zebra_Mix_r[smoother] = std::vector(nsc); - v_level[l]->A_Zebra_Mix_c[smoother] = std::vector(nsc); - v_level[l]->A_Zebra_Mix_v[smoother] = std::vector(nsc, 0); - - // define Asc_ortho block - v_level[l]->build_Asc_ortho(smoother); - - // Build vectors necessary for the parallel application of Asc_ortho: - // - ptr contains the nz entry for the points in the first radial line - // - shift contains the number of entries per node - int size_radial_line = v_level[l]->nr_int - v_level[l]->delete_circles; - v_level[l]->shift_vect_s2 = - std::vector(size_radial_line); // shift between 2 radial lines for smoother 2 - v_level[l]->shift_vect_s3 = std::vector(size_radial_line); // idem for smoother 3 - v_level[l]->ptr_vect_s2 = std::vector(size_radial_line); // ptr to a radial line for smoother 2 - v_level[l]->ptr_vect_s3 = std::vector(size_radial_line); // idem for smoother 3 - std::vector ptr_vect; - for (int j = v_level[l]->delete_circles; j < v_level[l]->nr_int; j++) { - ptr_vect = v_level[l]->get_ptr_sc(j, 2, 1); - v_level[l]->ptr_vect_s2[j - v_level[l]->delete_circles] = ptr_vect[0]; - v_level[l]->ptr_vect_s3[j - v_level[l]->delete_circles] = ptr_vect[1]; - v_level[l]->shift_vect_s2[j - v_level[l]->delete_circles] = ptr_vect[2] - ptr_vect[0]; - v_level[l]->shift_vect_s3[j - v_level[l]->delete_circles] = ptr_vect[3] - ptr_vect[1]; - } - } - } - } - - t_build_Asc += TOC; - TIC; - - if (gyro::icntl[Param::optimized] == 0) { -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - v_level[l]->A_Zebra_r_LU.assign(4, std::vector()); - v_level[l]->A_Zebra_c_LU.assign(4, std::vector()); - v_level[l]->A_Zebra_v_LU.assign(4, std::vector()); - for (int smoother = 0; smoother < 4; smoother++) { - v_level[l]->A_Zebra_r_LU[smoother] = std::vector(v_level[l]->A_Zebra_r[smoother]); - v_level[l]->A_Zebra_c_LU[smoother] = std::vector(v_level[l]->A_Zebra_c[smoother]); - v_level[l]->A_Zebra_v_LU[smoother] = std::vector(v_level[l]->A_Zebra_v[smoother]); - v_level[l]->A_Zebra_r[smoother].clear(); - v_level[l]->A_Zebra_c[smoother].clear(); - v_level[l]->A_Zebra_v[smoother].clear(); - v_level[l]->A_Zebra_r[smoother].shrink_to_fit(); - v_level[l]->A_Zebra_c[smoother].shrink_to_fit(); - v_level[l]->A_Zebra_v[smoother].shrink_to_fit(); - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Factorizing smoother " << smoother << "...\n"; - v_level[l]->facto_gaussian_elimination( - v_level[l]->A_Zebra_r_LU[smoother], v_level[l]->A_Zebra_c_LU[smoother], - v_level[l]->A_Zebra_v_LU[smoother], v_level[l]->m_sc[smoother]); - } - v_level[l]->A_Zebra_r.clear(); - v_level[l]->A_Zebra_c.clear(); - v_level[l]->A_Zebra_v.clear(); - v_level[l]->A_Zebra_r.shrink_to_fit(); - v_level[l]->A_Zebra_c.shrink_to_fit(); - v_level[l]->A_Zebra_v.shrink_to_fit(); -#ifdef GMGPOLAR_USE_MUMPS - } - else - for (int smoother = 0; smoother < 4; smoother++) - v_level[l]->facto_mumps(v_level[l]->mumps_A_Zebra[smoother], v_level[l]->A_Zebra_r[smoother], - v_level[l]->A_Zebra_c[smoother], v_level[l]->A_Zebra_v[smoother], - v_level[l]->m_sc[smoother]); -#endif - t_facto_Asc += TOC; - TIC; - } - else { - for (int smoother = 0; smoother < 4; smoother++) { - TIC; - v_level[l]->A_Zebra_r_LU_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - v_level[l]->A_Zebra_c_LU_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - v_level[l]->A_Zebra_v_LU_row[smoother].assign(v_level[l]->nblocks[smoother], std::vector()); - t_facto_Asc += TOC; - TIC; - for (int ij = 0; ij < v_level[l]->nblocks[smoother]; ij++) { - // Diagonal smoother if: - // - DB and first radius - // - only 1 element (should not happen) - // - extrapolation on level 0 for smoothers 0 and 2 (except across the origin stencil) - if ((smoother == 0 && ij == 0 && gyro::icntl[Param::DirBC_Interior]) || - v_level[l]->m_sc[smoother] == 1 || - (gyro::icntl[Param::extrapolation] && l == 0 && smoother % 2 == 0 && - !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && ij == 0))) { - if (gyro::icntl[Param::verbose] > 3) - std::cout << "No diagonal factorization\n"; - v_level[l]->A_Zebra_v_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_v_row[smoother][ij]); - } - // Circle smoother if: - // - smoother 0 or 1 - // - and not across - else if (smoother < 2 && !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && ij == 0)) { - TIC; - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Circle factorization\n"; - // Initialize the LU factors - v_level[l]->fill_in_circle(ij, smoother); - // Factorization - v_level[l]->facto_circle( - v_level[l]->A_Zebra_r_LU_row[smoother][ij], v_level[l]->A_Zebra_c_LU_row[smoother][ij], - v_level[l]->A_Zebra_v_LU_row[smoother][ij], v_level[l]->m_sc[smoother]); -#pragma omp atomic - t_facto_Asc += TOC; - TIC; - } - else if (smoother > 1) { - TIC; - // Initialize the LU factors - v_level[l]->A_Zebra_r_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_r_row[smoother][ij]); - v_level[l]->A_Zebra_c_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_c_row[smoother][ij]); - v_level[l]->A_Zebra_v_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_v_row[smoother][ij]); - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Radial factorization\n"; - // Factorization - v_level[l]->facto_radial( - v_level[l]->A_Zebra_r_LU_row[smoother][ij], v_level[l]->A_Zebra_c_LU_row[smoother][ij], - v_level[l]->A_Zebra_v_LU_row[smoother][ij], v_level[l]->m_sc[smoother]); -#pragma omp atomic - t_facto_Asc += TOC; - TIC; - } - if (smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && ij == 0) { - TIC; - v_level[l]->A_Zebra_r_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_r_row[smoother][ij]); - v_level[l]->A_Zebra_c_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_c_row[smoother][ij]); - v_level[l]->A_Zebra_v_LU_row[smoother][ij] = - std::vector(v_level[l]->A_Zebra_v_row[smoother][ij]); - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Across factorization..."; -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - if (gyro::icntl[Param::verbose] > 3) - std::cout << "using in-house direct solver.\n"; - // Factorization - v_level[l]->facto_gaussian_elimination(v_level[l]->A_Zebra_r_LU_row[smoother][ij], - v_level[l]->A_Zebra_c_LU_row[smoother][ij], - v_level[l]->A_Zebra_v_LU_row[smoother][ij], - v_level[l]->m_sc[smoother]); -#ifdef GMGPOLAR_USE_MUMPS - } - else { - if (gyro::icntl[Param::verbose] > 2) - std::cout << "using MUMPS.\n"; - v_level[l]->facto_mumps( - v_level[l]->mumps_across, v_level[l]->A_Zebra_r_row[smoother][ij], - v_level[l]->A_Zebra_c_row[smoother][ij], v_level[l]->A_Zebra_v_row[smoother][ij], - v_level[l]->m_sc[smoother]); - } -#endif -#pragma omp atomic - t_facto_Asc += TOC; - TIC; - } - v_level[l]->A_Zebra_r_row[smoother][ij].clear(); - v_level[l]->A_Zebra_c_row[smoother][ij].clear(); - v_level[l]->A_Zebra_v_row[smoother][ij].clear(); - v_level[l]->A_Zebra_r_row[smoother][ij].shrink_to_fit(); - v_level[l]->A_Zebra_c_row[smoother][ij].shrink_to_fit(); - v_level[l]->A_Zebra_v_row[smoother][ij].shrink_to_fit(); - } - v_level[l]->A_Zebra_r_row[smoother].clear(); - v_level[l]->A_Zebra_c_row[smoother].clear(); - v_level[l]->A_Zebra_v_row[smoother].clear(); - v_level[l]->A_Zebra_r_row[smoother].shrink_to_fit(); - v_level[l]->A_Zebra_c_row[smoother].shrink_to_fit(); - v_level[l]->A_Zebra_v_row[smoother].shrink_to_fit(); - } - } - - // Prolongation defined on all except the coarsest level - TIC; - if (gyro::icntl[Param::matrix_free] == 0) { - v_level[l]->define_nz_P(); - - // // Number of nonzeros in the matrix - if (gyro::icntl[Param::verbose] > 3) - std::cout << "nz_P: " << v_level[l]->nz_P << "\n"; - v_level[l]->ri_prol = std::vector(v_level[l]->nz_P); - v_level[l]->ci_prol = std::vector(v_level[l]->nz_P); - v_level[l]->v_prol = std::vector(v_level[l]->nz_P); - v_level[l]->build_prolongation_bi(); - - // // Number of nonzeros in the matrix - if (gyro::icntl[Param::verbose] > 3) - std::cout << "nz_P_inj: " << v_level[l]->nz_P_inj << "\n"; - v_level[l]->ri_prol_inj = std::vector(v_level[l]->nz_P_inj); - v_level[l]->ci_prol_inj = std::vector(v_level[l]->nz_P_inj); - v_level[l]->v_prol_inj = std::vector(v_level[l]->nz_P_inj); - v_level[l]->build_prolongation_inj(); - - // // Number of nonzeros in the matrix - if (gyro::icntl[Param::verbose] > 3) - std::cout << "nz_P_ex: " << v_level[l]->nz_P_ex << "\n"; - v_level[l]->ri_prol_ex = std::vector(v_level[l]->nz_P_ex); - v_level[l]->ci_prol_ex = std::vector(v_level[l]->nz_P_ex); - v_level[l]->v_prol_ex = std::vector(v_level[l]->nz_P_ex); - v_level[l]->build_prolongation_ex(); - - t_build_P += TOC; - TIC; - } - } - } - - if (gyro::icntl[Param::verbose] > 3) - std::cout << "Operators created.\n"; - - t = t_setup; - t_setup = TOC; -} /* ----- end of level::prepare_op_levels ----- */ \ No newline at end of file diff --git a/src/prolongation.cpp b/src/prolongation.cpp deleted file mode 100644 index 548efeed..00000000 --- a/src/prolongation.cpp +++ /dev/null @@ -1,1141 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file prolongation.cpp - * \brief Implementation of the prolongation operators - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ -#include "level.h" - -/*! - * \brief Builds the bilinear interpolation - * - * Builds bilinear interpolation for Dirichlet boundary conditions in - * variable r and periodic boundary conditions in phi. Can be used for a - * disk as well as for an annulus. (might be used for other geometries with - * Dirichlet boundary conditions in 'x' and periodic boundary conditions - * in 'y' as well; not tested!) - * - * uses Anisotropic Bilinear Interpolation stencil - * for isotropic mesh, anisotropic stencil reduces to isotropic definition - * ]1 2 1[ - * 1/4 ]2 4 2[ - * ]1 2 1[ - * - */ -void level::build_prolongation_bi() -{ - int index = 0; - int row, col; - double h_prev, h_next, k_prev, k_next, denum, val; - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - } - } - // Coarse nodes in same r (2i, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - k_prev = thetaplus[(i + ntheta_int - 1) % ntheta_int]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - - // Previous coarse node (left) - col = j * ntheta_int / 4 + (i - 1) / 2; - val = k_next * denum; // 1/2 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - - // Next coarse node (right) - col = j * ntheta_int / 4 + iplus_vect[i] / 2; - val = k_prev * denum; // 1/2 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - } - } - // Coarse nodes in same theta (2i+1, 2j) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; (TODO correct comment) - for (int j = 1; j <= nr_int - 1; j += 2) { - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - - // Previous coarse node (bottom) - col = (j - 1) * ntheta_int / 4 + i / 2; - val = h_next * denum; // 1/2 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - - // Next coarse node (top) - col = (j + 1) * ntheta_int / 4 + i / 2; - val = h_prev * denum; // 1/2 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - } - } - // Coarse nodes in diagonals (2i+1, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; (TODO correct comment) - for (int j = 1; j <= nr_int - 1; j += 2) { - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - k_prev = thetaplus[i - 1]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - - // top_right - col = (j + 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = h_prev * k_prev * denum; // isotrop: 1/4 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - // top_left - col = (j + 1) * ntheta_int / 4 + (i - 1) / 2; - val = h_prev * k_next * denum; // isotrop: 1/4 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - - // bottom_right - col = (j - 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = h_next * k_prev * denum; // isotrop: 1/4 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - // bottom_left - col = (j - 1) * ntheta_int / 4 + (i - 1) / 2; - val = h_next * k_next * denum; // isotrop: 1/4 - ri_prol[index] = row; - ci_prol[index] = col; - v_prol[index] = val; - index++; - } - } -} /* ----- end of level::build_prolongation_bi ----- */ - -/*! - * \brief Applies the bilinear interpolation - * - * Applies bilinear interpolation for Dirichlet boundary conditions in - * variable r and periodic boundary conditions in phi. Can be used for a - * disk as well as for an annulus. (might be used for other geometries with - * Dirichlet boundary conditions in 'x' and periodic boundary conditions - * in 'y' as well; not tested!) - * - * uses Anisotropic Bilinear Interpolation stencil - * for isotropic mesh, anisotropic stencil reduces to isotropic definition - * ]1 2 1[ - * 1/4 ]2 4 2[ - * ]1 2 1[ - * - */ -std::vector level::apply_prolongation_bi(std::vector u) -{ - //Prolongation (P * u = Pu), (m x mc) * mc = m - std::vector Pu = std::vector(m, 0); - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - -#pragma omp parallel shared(iplus_vect) - { -#pragma omp single - { - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in same r (2i, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double k_prev, k_next, denum, val; - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - k_prev = thetaplus[(i + ntheta_int - 1) % ntheta_int]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - - // Previous coarse node (left) - col = j * ntheta_int / 4 + (i - 1) / 2; - val = k_next * denum; // 1/2 - Pu[row] += val * u[col]; - - // Next coarse node (right) - col = j * ntheta_int / 4 + iplus_vect[i] / 2; - val = k_prev * denum; // 1/2 - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in same theta (2i+1, 2j) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; (TODO: correct comment) - for (int j = 1; j <= nr_int - 1; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double h_prev, h_next, denum, val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - - // Previous coarse node (bottom) - col = (j - 1) * ntheta_int / 4 + i / 2; - val = h_next * denum; // 1/2 - Pu[row] += val * u[col]; - - // Next coarse node (top) - col = (j + 1) * ntheta_int / 4 + i / 2; - val = h_prev * denum; // 1/2 - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in diagonals (2i+1, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; (TODO: correct comment) - for (int j = 1; j <= nr_int - 1; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double k_prev, k_next, h_prev, h_next, denum, val; - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - k_prev = thetaplus[i - 1]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - - // top_right - col = (j + 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = h_prev * k_prev * denum; // isotrop: 1/4 - Pu[row] += val * u[col]; - // top_left - col = (j + 1) * ntheta_int / 4 + (i - 1) / 2; - val = h_prev * k_next * denum; // isotrop: 1/4 - Pu[row] += val * u[col]; - - // bottom_right - col = (j - 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = h_next * k_prev * denum; // isotrop: 1/4 - Pu[row] += val * u[col]; - // bottom_left - col = (j - 1) * ntheta_int / 4 + (i - 1) / 2; - val = h_next * k_next * denum; // isotrop: 1/4 - Pu[row] += val * u[col]; - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_prolongation_bi ----- */ - -/*! - * \brief Applies the bilinear interpolation - * - * Applies bilinear interpolation for Dirichlet boundary conditions in - * variable r and periodic boundary conditions in phi. Can be used for a - * disk as well as for an annulus. (might be used for other geometries with - * Dirichlet boundary conditions in 'x' and periodic boundary conditions - * in 'y' as well; not tested!) - * - * uses Anisotropic Bilinear Interpolation stencil - * for isotropic mesh, anisotropic stencil reduces to isotropic definition - * ]1 2 1[ - * 1/4 ]2 4 2[ - * ]1 2 1[ - * - */ -std::vector level::apply_restriction_bi(std::vector u) -{ - //Restriction (P^T * u = Pu), (mc x m) * m = mc - std::vector Pu = std::vector(mc, 0); - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - std::vector imoins_vect(ntheta_int); - for (int i = 1; i < ntheta_int; i++) - imoins_vect[i] = i - 1; - imoins_vect[0] = ntheta_int - 1; - -#pragma omp parallel shared(iplus_vect) - { -#pragma omp single - { - // // Loop through all coarse nodes - // First and last radius - // => nb_nodes = ntheta_int; - int jc = 0; -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, ic, i_f, j_f; - double k_prev, k_next, h_prev, h_next, denum, val; - for (ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_next * denum; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_prev * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in same theta (2i+1, 2j) - // Next fine node (top) - i = i_f; - j = j_f + 1; - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - val = h_next * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in diagonals (2i+1, 2j+1) - // top_left - i = imoins_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_next * k_prev * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - // top_right - i = iplus_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_next * k_next * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - } - } //end of task - jc = nr_int / 2; -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, ic, i_f, j_f; - double k_prev, k_next, h_prev, h_next, denum, val; - for (ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_next * denum; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_prev * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in same theta (2i+1, 2j) - // Previous fine node (bottom) - i = i_f; - j = j_f - 1; - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - val = h_prev * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in diagonals (2i+1, 2j+1) - // bottom_left - i = imoins_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_prev * k_prev * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - // bottom_right - i = iplus_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_prev * k_next * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - } - } //end of task - // Interior - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; TODO: Correct comment - for (int jc = 1; jc < nr_int / 2; jc++) { -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, ic, i_f, j_f; - double k_prev, k_next, h_prev, h_next, denum, val; - for (ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_next * denum; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - denum = 1 / (k_prev + k_next); - val = k_prev * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Coarse nodes in same theta (2i+1, 2j) - // Next fine node (top) - i = i_f; - j = j_f + 1; - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - val = h_next * denum; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (bottom) - i = i_f; - j = j_f - 1; - row = j * ntheta_int + i; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / (h_prev + h_next); - val = h_prev * denum; // 1/2 - Pu[col] += val * u[row]; - - // // Coarse nodes in diagonals (2i+1, 2j+1) - // bottom_left - i = imoins_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_prev * k_prev * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - // bottom_right - i = iplus_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_prev * k_next * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - // top_left - i = imoins_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_next * k_prev * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - // top_right - i = iplus_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - k_prev = thetaplus[imoins_vect[i]]; - k_next = thetaplus[i]; - h_prev = hplus[j - 1]; - h_next = hplus[j]; - denum = 1 / ((k_prev + k_next) * (h_prev + h_next)); - val = h_next * k_next * denum; // isotrop: 1/4 - Pu[col] += val * u[row]; - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_restriction_bi ----- */ - -/*! - * \brief Builds the injection - * - * Builds injection: directly inject values of coarse nodes. - * Just uses values 1.0 for nodes of type 0. - * - */ -void level::build_prolongation_inj() -{ - int index = 0; - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - ri_prol_inj[index] = row; - ci_prol_inj[index] = col; - v_prol_inj[index] = val; - index++; - } - } -} /* ----- end of level::build_prolongation_inj ----- */ - -/*! - * \brief Applies the injection - * - * Applies injection: directly inject values of coarse nodes. - * Just uses values 1.0 for nodes of type 0. - * - */ -std::vector level::apply_prolongation_inj(std::vector u) -{ - std::vector Pu; - //Prolongation (P * u = Pu), (m x mc) * mc = m - Pu = std::vector(m, 0); - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - -#pragma omp parallel shared(iplus_vect) - { -#pragma omp single - { - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - Pu[row] += val * u[col]; - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_prolongation_inj ----- */ - -/*! - * \brief Applies the injection - * - * Applies injection: directly inject values of coarse nodes. - * Just uses values 1.0 for nodes of type 0. - * - */ -std::vector level::apply_restriction_inj(std::vector u) -{ - //Restriction (P^T * u = Pu), (mc x m) * m = mc - std::vector Pu = std::vector(mc, 0); - -#pragma omp parallel - { -#pragma omp single - { - // Loop through all coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int jc = 0; jc < nr_int / 2 + 1; jc++) { -#pragma omp task firstprivate(jc) shared(Pu) - { - int row, col, i, j, i_f, j_f; - double val; - for (int ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_restriction_inj ----- */ - -/*! - * \brief Builds the extrapolation operator - * - * Builds the prolongation operator for implicit extrapolation. - * - * The stencil is the same as the isotropic bilinear interpolation stencil, - * except for fine points with diagonal coarse neighboors (types 5,6,7) where only - * top_left and top_right values are used. - * - */ -void level::build_prolongation_ex() -{ - int index = 0; - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - } - } - // Coarse nodes in same r (2i, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { - int row, col; - double val; - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // Previous coarse node (left) - col = j * ntheta_int / 4 + (i - 1) / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - - // Next coarse node (right) - col = j * ntheta_int / 4 + iplus_vect[i] / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - } - } - // Coarse nodes in same theta (2i+1, 2j) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; TODO: Correct comment - int row, col; - double val; - for (int j = 1; j <= nr_int - 1; j += 2) { - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // Previous coarse node (bottom) - col = (j - 1) * ntheta_int / 4 + i / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - - // Next coarse node (top) - col = (j + 1) * ntheta_int / 4 + i / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - } - } - // Coarse nodes in diagonals (2i+1, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; TODO: Correct comment - for (int j = 1; j <= nr_int - 1; j += 2) { - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // no top_right - // top_left - col = (j + 1) * ntheta_int / 4 + (i - 1) / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - // bottom_right - col = (j - 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = 0.5; // 1/2 - ri_prol_ex[index] = row; - ci_prol_ex[index] = col; - v_prol_ex[index] = val; - index++; - // no bottom_left - } - } -} /* ----- end of level::build_prolongation_ex ----- */ - -/*! - * \brief Applies the extrapolation operator - * - * Applies the prolongation operator for implicit extrapolation. - * - * The stencil is the same as the isotropic bilinear interpolation stencil, - * except for fine points with diagonal coarse neighboors (types 5,6,7) where only - * top_left and top_right values are used. - * - */ -std::vector level::apply_prolongation_ex(std::vector u) -{ - std::vector Pu; - //Prolongation (P * u = Pu), (m x mc) * mc = m - Pu = std::vector(m, 0); - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - -#pragma omp parallel shared(iplus_vect) - { -#pragma omp single - { - // Coarse nodes - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - col = j * ntheta_int / 4 + i / 2; - val = 1.0; - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in same r (2i, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; - for (int j = 0; j < nr; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // Previous coarse node (left) - col = j * ntheta_int / 4 + (i - 1) / 2; - val = 0.5; // 1/2 - Pu[row] += val * u[col]; - - // Next coarse node (right) - col = j * ntheta_int / 4 + iplus_vect[i] / 2; - val = 0.5; // 1/2 - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in same theta (2i+1, 2j) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; TODO: Correct comment - for (int j = 1; j <= nr_int - 1; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 0; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // Previous coarse node (bottom) - col = (j - 1) * ntheta_int / 4 + i / 2; - val = 0.5; // 1/2 - Pu[row] += val * u[col]; - - // Next coarse node (top) - col = (j + 1) * ntheta_int / 4 + i / 2; - val = 0.5; // 1/2 - Pu[row] += val * u[col]; - } - } //end of task - } - // Coarse nodes in diagonals (2i+1, 2j+1) - // => nb_nodes = ntheta_int * (nr_int / 2 - 2) / 2; TODO: Correct comment - for (int j = 1; j <= nr_int - 1; j += 2) { -#pragma omp task firstprivate(j) shared(iplus_vect, Pu) - { - int row, col; - double val; - for (int i = 1; i < ntheta_int; i += 2) { - row = j * ntheta_int + i; - - // no top_right - // top_left - col = (j + 1) * ntheta_int / 4 + (i - 1) / 2; - val = 0.5; // isotrop: 1/4 - Pu[row] += val * u[col]; - - // bottom_right - col = (j - 1) * ntheta_int / 4 + iplus_vect[i] / 2; - val = 0.5; // isotrop: 1/4 - Pu[row] += val * u[col]; - // no bottom_left - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_prolongation_ex ----- */ - -/*! - * \brief Applies the extrapolation operator - * - * Applies the prolongation operator for implicit extrapolation. - * - * The stencil is the same as the isotropic bilinear interpolation stencil, - * except for fine points with diagonal coarse neighboors (types 5,6,7) where only - * top_left and top_right values are used. - * - */ -std::vector level::apply_restriction_ex(std::vector u) -{ - //Restriction (P^T * u = Pu), (mc x m) * m = mc - std::vector Pu = std::vector(mc, 0); - - std::vector iplus_vect(ntheta_int); - for (int i = 0; i < ntheta_int - 1; i++) - iplus_vect[i] = i + 1; - iplus_vect[ntheta_int - 1] = 0; - std::vector imoins_vect(ntheta_int); - for (int i = 1; i < ntheta_int; i++) - imoins_vect[i] = i - 1; - imoins_vect[0] = ntheta_int - 1; - -#pragma omp parallel shared(iplus_vect) - { -#pragma omp single - { - // // Loop through all coarse nodes - int jc = 0; -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, i_f, j_f; - double val; - for (int ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in same theta (2i+1, 2j) - // Next fine node (top) - i = i_f; - j = j_f + 1; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in diagonals (2i+1, 2j+1) - // no bottom_left - // no bottom_right - // top_left - i = imoins_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - val = 0.5; // isotrop: 1/4 - Pu[col] += val * u[row]; - // no top_right - } - } //end of task - jc = nr_int / 2; -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, i_f, j_f; - double val; - for (int ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in same theta (2i+1, 2j) - // Previous fine node (bottom) - i = i_f; - j = j_f - 1; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in diagonals (2i+1, 2j+1) - // no bottom_left - // bottom_right - i = iplus_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - val = 0.5; // isotrop: 1/4 - Pu[col] += val * u[row]; - // no top_left - // no top_right - } - } //end of task - // => nb_nodes = ntheta_int * (nr_int / 2 + 1) / 2; TODO: Correct comment - for (int jc = 1; jc < nr_int / 2; jc++) { -#pragma omp task firstprivate(jc) shared(iplus_vect, imoins_vect, Pu) - { - int row, col, i, j, i_f, j_f; - double val; - for (int ic = 0; ic < ntheta_int / 2; ic++) { - col = jc * ntheta_int / 2 + ic; - i_f = ic * 2; - j_f = jc * 2; - - // // Coarse nodes - i = i_f; - j = j_f; - row = j * ntheta_int + i; - val = 1.0; - Pu[col] += val * u[row]; - - // // Fine nodes in same r (2i, 2j+1) - // Next fine node (right) - i = iplus_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (left) - i = imoins_vect[i_f]; - j = j_f; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in same theta (2i+1, 2j) - // Next fine node (top) - i = i_f; - j = j_f + 1; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - // Previous fine node (bottom) - i = i_f; - j = j_f - 1; - row = j * ntheta_int + i; - val = 0.5; // 1/2 - Pu[col] += val * u[row]; - - // // Fine nodes in diagonals (2i+1, 2j+1) - // no bottom_left - // bottom_right - i = iplus_vect[i_f]; - j = j_f - 1; - row = j * ntheta_int + i; - val = 0.5; // isotrop: 1/4 - Pu[col] += val * u[row]; - // top_left - i = imoins_vect[i_f]; - j = j_f + 1; - row = j * ntheta_int + i; - val = 0.5; // isotrop: 1/4 - Pu[col] += val * u[row]; - // no top_right - } - } //end of task - } - } //end of single - } //end of parallel - - return Pu; -} /* ----- end of level::apply_restriction_ex ----- */ diff --git a/src/smoother.cpp b/src/smoother.cpp deleted file mode 100644 index 0c183373..00000000 --- a/src/smoother.cpp +++ /dev/null @@ -1,4689 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/*! - * \file multigrid_iter.cpp - * \brief Implementation of the smoother - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ - -#include "level.h" -#include - -/*! - * \brief Returns the index i+1 in (0, ntheta) - * - * Returns (i + 1) % ntheta_int - * - * \param i: theta index - * \param ntheta_int: size of theta - * - * \return (i + 1) % ntheta_int - * - */ -inline int iplus(int i, int ntheta_int) -{ - return (i + 1 > ntheta_int - 1) ? 0 : i + 1; -} /* ----- end of inline iplus ----- */ - -/*! - * \brief Returns the index i-1 in (0, ntheta) - * - * Returns (i + ntheta_int - 1) % ntheta_int - * - * \param i: theta index - * \param ntheta_int: size of theta - * - * \return (i + ntheta_int - 1) % ntheta_int - * - */ -inline int imoins(int i, int ntheta_int) -{ - return (i - 1 < 0) ? ntheta_int - 1 : i - 1; -} /* ----- end of inline imoins ----- */ - -/*! - * \brief Defines the smoother - * - * Defines the smoother - * so far only different types of zebra splittings are implemented - * (basically, two colors, although more can be defined but which might not be used) - * - */ -void level::define_line_splitting() -{ - // useless array q - int i; - for (i = 2; i < nr_int - 2; i++) { - // assume that k_ij=theta_{i,j+1}-theta_{i,j} is constant for fixed i and variable j (i.e., constant per circle) - double q = (theta[1] - theta[0]) / (r[i] - r[i - 1]); - if (r[i] > 1 / q) - break; - } - delete_circles = i; // delete_circles = delete_circles(end); - - if (gyro::icntl[Param::verbose] > 2) - std::cout << "Shifting from circle to radial at radius " << delete_circles << "\n"; -} /* ----- end of destructor level::define_line_splitting ----- */ - -/*! \brief Applies smoothing - * - * For all lines of the smoother s and the colour c. - * The matrix A_sc is for all lines of points of the smoother s/c. - * The result is in u (or u_previous_cu_previous_r). - * - * if gyro::icntl[Param::smoother]= - * - 3: block Gauss Seidel for all 4 smoothers. - * - 13: block Jacobi between Circle and Radial, and block Gauss Seidel for B/W inside each. - * - * \param smoother: the smoother -*/ -void level::multigrid_smoothing(int smoother, int v, std::vector& f_Asc_u, int nblocks, int c, int* dep_Asc_cur, - int* dep_Asc_prev, int* dep_Asc1, int* dep_Asc_ortho_cur) -{ - double t, t_smoothing_tmp; - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - - TIC; - t_smoothing_tmp = t; - - if (gyro::icntl[Param::matrix_free] == 1) { - apply_Asc_ortho(f_Asc_u, u, smoother, v, c, dep_Asc_cur, dep_Asc_prev, dep_Asc1, dep_Asc_ortho_cur); - } - else { - /* if (gyro::icntl[Param::openmp] == 1) { - for (auto k = 0; k < A_Zebra_Mix_r[smoother].size(); k++) { - f_Asc_u[A_Zebra_Mix_r[smoother][k]] -= A_Zebra_Mix_v[smoother][k] * u[A_Zebra_Mix_c[smoother][k]]; - } - } - else { -*/ - if (smoother < 2) { - int start_j = 0; - if (gyro::icntl[Param::DirBC_Interior]) - start_j = 1; - - int start; - if (smoother == 0) - start = (gyro::icntl[Param::DirBC_Interior]) ? 2 : 0; - else if (smoother == 1) - start = 1; - int shift = 2; - for (int j = start; j < delete_circles; j += shift) { - int odd_j = j % 2; -#pragma omp task shared(u, f_Asc_u) firstprivate(smoother, j, odd_j) depend(in \ - : dep_Asc_prev[j - odd_j]), \ - depend(in \ - : dep_Asc_prev[j + odd_j]), \ - depend(out \ - : dep_Asc_ortho_cur[j]) - { - int smoother_tmp = get_smoother(0, j); - std::vector ptr_vect = get_ptr_sc(j, smoother_tmp, 1); - int ptr_start = ptr_vect[0]; - int ptr_end = ptr_start + (ptr_vect[2] - ptr_vect[0]) * ntheta_int / 2; - for (int k = ptr_start; k < ptr_end; k++) { - f_Asc_u[A_Zebra_Mix_r[smoother][k]] -= - A_Zebra_Mix_v[smoother][k] * u[A_Zebra_Mix_c[smoother][k]]; - } - dep_Asc_ortho_cur[j] = 1; - } - } - } - else { - std::vector shift_vect, ptr_vect; - if (smoother == 2) { - ptr_vect = ptr_vect_s2; - shift_vect = shift_vect_s2; - } - else { - ptr_vect = ptr_vect_s3; - shift_vect = shift_vect_s3; - } - for (int i = smoother - 2; i < ntheta_int; i += 2) { - int im = imoins(i, ntheta_int); - int ip = iplus(i, ntheta_int); - int odd_d = delete_circles % 2; - int ind_m_odd = i, ind_p_odd = i; - int odd_i = i % 2; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } -#pragma omp task shared(u, f_Asc_u) firstprivate(smoother, i, odd_d, ind_m_odd, ind_p_odd) \ - depend(in \ - : dep_Asc_prev[ind_m_odd]) depend(in \ - : dep_Asc_prev[ind_p_odd], dep_Asc1[delete_circles - 1 - odd_d]) \ - depend(out \ - : dep_Asc_ortho_cur[i]) - { - int start_s2_extr = (smoother == 2 && extrapol && delete_circles % 2 == 0) ? 1 : 0; - int shift_s2_extr = (smoother == 2 && extrapol) ? 2 : 1; - for (int j = delete_circles + start_s2_extr; j < nr_int; j += shift_s2_extr) { - for (int k = - ptr_vect[j - delete_circles] + (i - smoother + 2) / 2 * shift_vect[j - delete_circles]; - k < ptr_vect[j - delete_circles] + - ((i - smoother + 2) / 2 + 1) * shift_vect[j - delete_circles]; - k++) { - f_Asc_u[A_Zebra_Mix_r[smoother][k]] -= - A_Zebra_Mix_v[smoother][k] * u[A_Zebra_Mix_c[smoother][k]]; - } - } - dep_Asc_ortho_cur[i] = 1; - } - } - } - // } - } - - t_Asc_ortho += TOC; - TIC; - - /* if (gyro::icntl[Param::openmp] == 1) { - for (int k = 0; k < nblocks; k++) { - int ij_glob = k * 2 + smoother % 2; - int ind = ij_glob, indm = ij_glob - 1, indp = ij_glob + 1; - if (smoother > 1 && gyro::icntl[Param::matrix_free] == 1) { - indm = imoins(ij_glob, ntheta_int); - indp = iplus(ij_glob, ntheta_int); - } - TIC; - // create u_sc, f_sc - std::vector u_sc; - std::vector f_sc(m_sc[smoother]); - std::vector f_total(m_sc[smoother]), f_total2(m_sc[smoother]); - - std::vector::const_iterator first = f_Asc_u.begin() + k * m_sc[smoother]; - std::vector::const_iterator last = f_Asc_u.begin() + (k + 1) * m_sc[smoother]; - f_total = std::vector(first, last); - for (int i = 0; i < m_sc[smoother]; i++) - f_Asc_u[k * m_sc[smoother] + i] = 0; - - //compute f_total = f_sc - A_sc_ortho * u - build_fsc(f_sc, fVec, smoother, 0, k * m_sc[smoother], (k + 1) * m_sc[smoother]); - for (int i = 0; i < m_sc[smoother]; i++) { - f_sc[i] += f_total[i]; - } - - // #pragma omp atomic - t_f_sc += TOC; - TIC; - - // Dirichlet or size of system is 1 (diagonal solve) - if ((smoother == 0 && k == 0 && gyro::icntl[Param::DirBC_Interior]) || m_sc[smoother] == 1 || - (gyro::icntl[Param::extrapolation] && l == 0 && smoother % 2 == 0 && - !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && k == 0))) { - u_sc = solve_diag(A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Circle (not across) - else if (smoother < 2 && !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && k == 0)) { - u_sc = solve_circle(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Radial (not across) - else if (smoother > 1) { - u_sc = solve_radial(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Across (direct solver) - else { -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - u_sc = solve_gaussian_elimination(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); -#ifdef GMGPOLAR_USE_MUMPS - } - else - u_sc = solve_mumps(mumps_across, f_sc); -#endif - } - - t_Asc += TOC; - TIC; - - build_fsc(u_sc, u, smoother, 1, k * m_sc[smoother], (k + 1) * m_sc[smoother]); - - t_f_sc += TOC; - TIC; - } - } - else { -*/ - for (int k = 0; k < nblocks; k++) { - int ij_glob = k * 2 + smoother % 2; - int ind = ij_glob, indm = ij_glob - 1, indp = ij_glob + 1; - if (smoother > 1 && gyro::icntl[Param::matrix_free] == 1) { - indm = imoins(ij_glob, ntheta_int); - indp = iplus(ij_glob, ntheta_int); - } -#pragma omp task firstprivate(k, ij_glob, ind, indm, indp, t) shared(f_Asc_u) \ - depend(in \ - : dep_Asc_ortho_cur[indm], dep_Asc_ortho_cur[ind], dep_Asc_ortho_cur[indp]) depend(out \ - : dep_Asc_cur[ind]) - { - TIC; - // create u_sc, f_sc - std::vector u_sc; - std::vector f_sc(m_sc[smoother]); - std::vector f_total(m_sc[smoother]), f_total2(m_sc[smoother]); - - std::vector::const_iterator first = f_Asc_u.begin() + k * m_sc[smoother]; - std::vector::const_iterator last = f_Asc_u.begin() + (k + 1) * m_sc[smoother]; - f_total = std::vector(first, last); - for (int i = 0; i < m_sc[smoother]; i++) - f_Asc_u[k * m_sc[smoother] + i] = 0; - - //compute f_total = f_sc - A_sc_ortho * u - build_fsc(f_sc, fVec, smoother, 0, k * m_sc[smoother], (k + 1) * m_sc[smoother]); - for (int i = 0; i < m_sc[smoother]; i++) { - f_sc[i] += f_total[i]; - } - - // #pragma omp atomic - t_f_sc += TOC; - TIC; - - // Dirichlet or size of system is 1 (diagonal solve) - if ((smoother == 0 && k == 0 && gyro::icntl[Param::DirBC_Interior]) || m_sc[smoother] == 1 || - (gyro::icntl[Param::extrapolation] && l == 0 && smoother % 2 == 0 && - !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && k == 0))) { - u_sc = solve_diag(A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Circle (not across) - else if (smoother < 2 && !(smoother == 0 && !gyro::icntl[Param::DirBC_Interior] && k == 0)) { - u_sc = solve_circle(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Radial (not across) - else if (smoother > 1) { - u_sc = solve_radial(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); - } - // Across (direct solver) - else { -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - u_sc = solve_gaussian_elimination(A_Zebra_r_LU_row[smoother][k], A_Zebra_c_LU_row[smoother][k], - A_Zebra_v_LU_row[smoother][k], f_sc); -#ifdef GMGPOLAR_USE_MUMPS - } - else - u_sc = solve_mumps(mumps_across, f_sc); -#endif - } - -#pragma omp atomic - t_Asc += TOC; - TIC; - - build_fsc(u_sc, u, smoother, 1, k * m_sc[smoother], (k + 1) * m_sc[smoother]); - -#pragma omp atomic - t_f_sc += TOC; - TIC; - - dep_Asc_cur[ind] = 1; - } - // } - } - - t = t_smoothing_tmp; - t_smoothing += TOC; -} /* ----- end of level::multigrid_smoothing ----- */ - -/*! \brief Create the RHS part corresponding to Asc_ortho for a smoother (on level l) - * - * Create f_sc, i.e. the RHS part corresponding to Asc_ortho for a smoother (on level l) - * - * \param f_sc: the RHS part (out) - * \param smoother: the smoother -*/ -void level::build_fsc(std::vector& f_sc, std::vector& f, int smoother, int loc_to_glob, int start, - int end) -{ - std::vector ind = mapping_usc_to_u(start, end, smoother); - if (loc_to_glob) { - //computation of indices in the total vector u corresponding to the indices in u_sc - for (int i = start; i < end; ++i) { - int index = ind[i - start]; - f[index] = f_sc[i % m_sc[smoother]]; - } - } - else { - //computation of indices in the total vector u corresponding to the indices in u_sc - for (int i = start; i < end; ++i) { - int index = ind[i - start]; - f_sc[i % m_sc[smoother]] = f[index]; - } - } -} /* ----- end of level::build_fsc ----- */ - -/*! \brief Build the matrix A_sc explicitely on the level l - * - * Asc corresponds to all lines of a smoother s with colour c - * so we need to build 4 matrices Asc for the 4 smoothers on the level l, all stored in A_Zebra - * 0,1: circular white/black - * 2,3: radial white/black - * - * this function is called only once at the beginning to build the matrices Asc on all levels - * the matrix should contain only the parts corresponding to (s/c), - * thus it is not of size m, but smaller (number of points corresponding to the smoother s/c), - * so we need to treat the indices (!) -*/ -void level::build_Asc() -{ - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - int shift_ij = extrapol ? 1 : 0; - int smoother_prev, smoother_cur, smoother_next, smoother; - int start_j, start_loop, shift_loop, ip, im, ptr, row, col; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, beta_val; - - std::vector smoother23(ntheta_int); - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - std::vector> stencil23_prev(2), stencil23_cur(2), stencil23_next(2); - for (int i = 0; i < ntheta_int; i += 2) { - smoother23[i] = 2; - smoother23[i + 1] = 3; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Circle Smoother !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - smoother = 0; - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - for (int i = 0; i < ntheta_int / (shift_ij + 1); i++) { - A_Zebra_r_row[smoother][0][i] = i; - A_Zebra_c_row[smoother][0][i] = i; - A_Zebra_v_row[smoother][0][i] = 1.0; - } - start_j = 1; - } - else { // (r[0],0) is not on Dirichlet boundary - start_j = 0; - } - - for (int j = start_j; j < delete_circles; j++) { - /* Initialize moother, row_vect, ptr, and stencil */ - if (j > start_j) { - smoother_prev = smoother_cur; - smoother_cur = smoother_next; - row_vect_prev = row_vect; - row_vect = row_vect_next; - ptr_vect_prev = ptr_vect; - ptr_vect = ptr_vect_next; - stencil_prev = stencil_cur; - stencil_cur = stencil_next; - } - else { - smoother_cur = j; - row_vect = get_row(j, smoother_cur, extrapol, 1, 1); - ptr_vect = get_ptr_sc(j, smoother_cur, 0); - stencil_cur = get_stencil_sc(j, smoother_cur, 0); - } - if (j < delete_circles - 1) - smoother_next = get_smoother(0, j + 1); - else - smoother_next = 2; - row_vect_next = get_row(j + 1, smoother_next, extrapol, 1, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next, 0); - if (j < delete_circles - 1) - stencil_next = get_stencil_sc(j + 1, smoother_next, 0); - else { - stencil23_next[0] = get_stencil_sc(j + 1, 2, 0); - stencil23_next[1] = get_stencil_sc(j + 1, 3, 0); - } - hs = hplus[j]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - - /* Update (j-1, i) */ - if (j > start_j) { - hsmin1 = hplus[j - 1]; - smoother = smoother_prev; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - ptr = ptr_vect_prev[i]; - stencil = stencil_prev; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - col = row_vect_prev[i]; - - A_Zebra_v_row[smoother][(j - 1) / 2][ptr + stencil[Param::middle]] += coeff; - } - } - else { - smoother = smoother_cur; - stencil = stencil_cur; - // Across: bottom update - if (!gyro::icntl[Param::DirBC_Interior]) { - hsmin1 = 2 * r[0]; - arr_vect2 = gyro::arr(r[j], theta_PI, sin_theta_PI, cos_theta_PI, ntheta_int, 0); - for (int i = shift_ij; i < ntheta_int; i += shift_ij + 1) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect[i]; - row = row_vect[i]; - col = row_vect[(i + ntheta_int / 2) % ntheta_int]; - A_Zebra_r_row[smoother][j / 2][ptr + stencil[Param::bottom]] = row; - A_Zebra_c_row[smoother][j / 2][ptr + stencil[Param::bottom]] = col; - - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - coeff2 = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::bottom]] += -coeff - coeff2; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - } - } - // Dirichlet - else { - hsmin1 = hplus[j - 1]; - // DB contribution arr (r(0)) - arr_vect2 = gyro::arr(r[j - 1], theta, sin_theta, cos_theta, ntheta_int, 0); - - for (int i = 0; i < ntheta_int; i++) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect[i]; - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect2[i] / hsmin1; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - } - } - } - - /* Update (j, x) */ - smoother = smoother_cur; - if (!extrapol || smoother == 1) { - for (int i = 0; i < ntheta_int; i++) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - stencil = stencil_cur; - ip = iplus(i, ntheta_int); - im = imoins(i, ntheta_int); - - // Update (j, i) - ptr = ptr_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][j / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][j / 2][ptr + stencil[Param::middle]] = row; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - col = row_vect[im]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::left]] += -coeff2 / ktmin1; - col = row_vect[ip]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::right]] += -coeff2 / kt; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += beta_val; - - // Update (j, i+1) - ptr = ptr_vect[ip]; - row = row_vect[ip]; - col = row_vect[i]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - A_Zebra_r_row[smoother][j / 2][ptr + stencil[Param::left]] = row; - A_Zebra_c_row[smoother][j / 2][ptr + stencil[Param::left]] = col; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::left]] += -coeff; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - ptr = ptr_vect[im]; - row = row_vect[im]; - col = row_vect[i]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - A_Zebra_r_row[smoother][j / 2][ptr + stencil[Param::right]] = row; - A_Zebra_c_row[smoother][j / 2][ptr + stencil[Param::right]] = col; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::right]] += -coeff; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - } - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - stencil = stencil_cur; - ip = iplus(i, ntheta_int); - im = imoins(i, ntheta_int); - col = row_vect[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - row = row_vect[ip]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - row = row_vect[im]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += coeff; - - // Update (j, i) [for i+1] - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - ptr = ptr_vect[i + 1]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - row = row_vect[i + 1]; - A_Zebra_r_row[smoother][j / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][j / 2][ptr + stencil[Param::middle]] = row; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + ip]; - - A_Zebra_v_row[smoother][j / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - - /* Update (j+1, i) */ - if (j < delete_circles - 1) { - smoother = smoother_next; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect_next[i]; - stencil = stencil_next; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - row = row_vect_next[i]; - - A_Zebra_v_row[smoother][(j + 1) / 2][ptr + stencil[Param::middle]] += coeff; - } - } - else if (j == delete_circles - 1) { - if (extrapol && (j + 1) % 2 == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect_next[i]; - smoother = smoother23[i]; - stencil = stencil23_next[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - row = row_vect_next[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += coeff; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Radial Smoother !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = delete_circles; j < nr_int; j++) { - /* Initialize moother, row_vect, ptr, and stencil */ - if (j == delete_circles) { - smoother_prev = get_smoother(0, j - 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev, 0); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 1, 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev, 0); - } - else { - stencil23_prev[0] = get_stencil_sc(j - 1, 2, 0); - stencil23_prev[1] = get_stencil_sc(j - 1, 3, 0); - row_vect_prev = get_row(j - 1, 2, extrapol, 1, 1); - ptr_vect_prev = get_ptr_sc(j - 1, 2, 0); - } - row_vect = row_vect_next; - ptr_vect = ptr_vect_next; - stencil23_cur[0] = get_stencil_sc(j, 2, 0); - stencil23_cur[1] = get_stencil_sc(j, 3, 0); - if (j < nr_int - 1) { - row_vect_next = get_row(j + 1, 2, extrapol, 1, 1); - ptr_vect_next = get_ptr_sc(j + 1, 2, 0); - stencil23_next[0] = get_stencil_sc(j + 1, 2, 0); - stencil23_next[1] = get_stencil_sc(j + 1, 3, 0); - } - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (j == nr_int - 1) - arr_vect2 = gyro::arr(r[j + 1], theta, sin_theta, cos_theta, ntheta_int, 0); - /* Update (j-1, i) */ - if (j == delete_circles) { - smoother = smoother_prev; - stencil = stencil_prev; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - ptr = ptr_vect_prev[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - row = row_vect_prev[i]; - - A_Zebra_v_row[smoother][(j - 1) / 2][ptr + stencil[Param::middle]] += coeff; - } - } - else { - if (extrapol) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - ptr = ptr_vect_prev[i]; - stencil = stencil23_prev[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - row = row_vect_prev[i]; - col = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::top]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::top]] = col; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::top]] += -coeff; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += coeff; - } - start_loop = 0; - shift_loop = 2; - if (extrapol && j % 2 == 0) { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - ptr = ptr_vect_prev[i]; - stencil = stencil23_prev[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - row = row_vect_prev[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += coeff; - } - } - } - - /* Update (j, x) */ - if (extrapol) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - if (j == delete_circles) { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - // Update (j, i) - ptr = ptr_vect[i]; - stencil = stencil23_cur[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - col = row_vect_prev[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::top]] += -coeff / hs; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - else if (j == nr_int - 1) { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - // Update (j, i) - ptr = ptr_vect[i]; - stencil = stencil23_cur[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (kt + ktmin1) * arr_vect2[i] / hs; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - col = row_vect_next[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += - coeff / hsmin1 + coeff / hs + coeff3 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - else { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - // Update (j, i) - ptr = ptr_vect[i]; - stencil = stencil23_cur[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - col = row_vect_next[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::top]] += -coeff / hs; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - col = row_vect_prev[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::bottom]] += -coeff / hsmin1; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - start_loop = 0; - shift_loop = 2; - if (extrapol && j % 2 == 1) { - if (j == nr_int - 1) { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - smoother = smoother23[i]; - stencil = stencil23_cur[smoother - 2]; - ptr = ptr_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (kt + ktmin1) * arr_vect2[i] / hs; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += - coeff / hsmin1 + coeff / hs + coeff3 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - else { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - smoother = smoother23[i]; - stencil = stencil23_cur[smoother - 2]; - ptr = ptr_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i]; - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::middle]] = row; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += - coeff / hs + coeff / hsmin1 + coeff2 / ktmin1 + coeff2 / kt; - - // Beta coefficient - beta_val = betaVec[j * ntheta_int + i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += beta_val; - } - } - } - if (extrapol && j % 2 == 0) { - start_loop = 0; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ip = iplus(i, ntheta_int); - im = imoins(i, ntheta_int); - smoother = smoother23[ip]; - stencil = stencil23_cur[smoother - 2]; - - // Update (j, i+1) - ptr = ptr_vect[ip]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / kt; - row = row_vect[ip]; - - A_Zebra_v_row[smoother][ip / 2][ptr + stencil[Param::middle]] += coeff; - - // Update (j, i-1) - smoother = smoother23[im]; - ptr = ptr_vect[im]; - coeff = 0.5 * (hs + hsmin1) * att_vect[i] / ktmin1; - row = row_vect[im]; - - A_Zebra_v_row[smoother][im / 2][ptr + stencil[Param::middle]] += coeff; - } - - /* Update (j+1, i) */ - if (j < nr_int - 1) { - if (extrapol) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - ptr = ptr_vect_next[i]; - stencil = stencil23_next[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - row = row_vect_next[i]; - col = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr + stencil[Param::bottom]] = row; - A_Zebra_c_row[smoother][i / 2][ptr + stencil[Param::bottom]] = col; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::bottom]] += -coeff; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += coeff; - } - start_loop = 0; - shift_loop = 2; - if (extrapol && j % 2 == 0) { - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother = smoother23[i]; - - ptr = ptr_vect_next[i]; - stencil = stencil23_next[smoother - 2]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - row = row_vect_next[i]; - - A_Zebra_v_row[smoother][i / 2][ptr + stencil[Param::middle]] += coeff; - } - } - } - } - - // Take boundary condition into account: Dirichlet-RB - int j = nr_int; - ptr_vect = get_ptr_sc(j, 2, 0); - row_vect = get_row(j, 2, extrapol, 1, 1); - for (int i = shift_ij; i < ntheta_int; i += shift_ij + 1) { - ptr = ptr_vect[i]; - smoother = smoother23[i]; - // row = get_row_radial(i, nr_int, smoother, extrapol, ntheta_int, delete_circles); - row = row_vect[i]; - A_Zebra_r_row[smoother][i / 2][ptr] = row; - A_Zebra_c_row[smoother][i / 2][ptr] = row; - A_Zebra_v_row[smoother][i / 2][ptr] += 1.0; - } -} /* ----- end of level::build_Asc ----- */ - -/*! \brief Applies the matrix A_sc_ortho for a smoother explicitely on the level l - * - * Asc_ortho corresponds to all lines of a smoother s with colour c and the columns not in Asc - * - * \param smoother_todo: the smoother of this Asc_ortho matrix -*/ -void level::build_Asc_ortho(int smoother_todo) -{ - int start_j, j, odd_j; - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - - int smoother = smoother_todo; - int smoother_prev, smoother_cur, smoother_next; - int smoother_prev_circle, smoother_cur_left, smoother_cur_circle, smoother_cur_right, smoother_next_circle; - int start_loop, shift_loop; - int row, row2, col, col2, ptr; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, val, val2; - int base_prec; - if (smoother == 1) - base_prec = delete_circles + 1; - else if (smoother == 0) - base_prec = -(delete_circles + 1); - else if (smoother == 3) - base_prec = ntheta_int; - else if (smoother == 2) - base_prec = -ntheta_int; - - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector ptr_vect_prev, ptr_vect, ptr_vect_next; - std::vector stencil_prev, stencil_cur, stencil_cur_left, stencil_cur_right, stencil_next, stencil; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Circle Smoother !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - dep_Asc_ortho[0][0] = 1; - dep_Asc_ortho[1][0] = 1; - start_j = 1; - } - else { // (r[0],0) is not on Dirichlet boundary - start_j = 0; - } - - if (smoother < 2) { - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (circle) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles; - odd_j = j % 2; - - smoother_prev = get_smoother(0, j - 1); - smoother_vect = get_smoother_radial(j); - smoother_vect_next = get_smoother_radial(j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev, 1); - ptr_vect = get_ptr_sc(j, smoother_vect[0], 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_vect_next[0], 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev, 1); - stencil_cur = get_stencil_sc(j, smoother_vect[0], 1); - stencil_next = get_stencil_sc(j + 1, smoother_vect_next[0], 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, 2, extrapol, 0, 1); - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_prev == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - stencil = stencil_prev; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect_prev[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect_prev[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] += val2; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - odd_j = j % 2; - - if (delete_circles > 2 || !gyro::icntl[Param::DirBC_Interior]) { - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_vect_next = get_smoother_radial(j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev, 1); - ptr_vect = get_ptr_sc(j, smoother_cur, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_vect_next[0], 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev, 1); - stencil_cur = get_stencil_sc(j, smoother_cur, 1); - stencil_next = get_stencil_sc(j + 1, smoother_vect_next[0], 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - stencil = stencil_cur; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val2; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - - ptr = ptr_vect[i + 1]; - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val2; - } - } - } - else if (smoother_prev == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - stencil = stencil_prev; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect_prev[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - stencil = stencil_cur; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val2; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] -= val2; - } - } - else if (smoother_prev == smoother) { - stencil = stencil_prev; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect_prev[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] += val2; - } - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = delete_circles - 2; j > start_j; j--) { - odd_j = j % 2; - - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_next = get_smoother(0, j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev, 1); - ptr_vect = get_ptr_sc(j, smoother_cur, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next, 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev, 1); - stencil_cur = get_stencil_sc(j, smoother_cur, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next, 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - stencil = stencil_cur; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val2; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - ptr = ptr_vect[iplus(i, ntheta_int)]; - - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val2; - // ??? - } - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - - // Update (j+1, i) - stencil = stencil_next; - ptr = ptr_vect_next[i]; - - row = row_vect_next[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - stencil = stencil_cur; - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val2; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] -= val2; - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] += val2; - - // Update (j+1, i) - stencil = stencil_next; - ptr = ptr_vect_next[i]; - - row = row_vect_next[i]; - val = -art_vect[i]; - val2 = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] += val2; - } - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! First lines !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = start_j; - odd_j = j % 2; - - smoother_cur = j; - ptr_vect = get_ptr_sc(j, smoother_cur, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - if (j < delete_circles - 1) { - smoother_next = (j + 1) % 2; - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - } - else if (j == delete_circles - 1) { - smoother_vect_next = get_smoother_radial(j + 1); - smoother_next = smoother_vect_next[0]; - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - } - ptr_vect_next = get_ptr_sc(j + 1, smoother_next, 1); - stencil_cur = get_stencil_sc(j, smoother_cur, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next, 1); - - hs = hplus[j]; - if (j > 0) { - hsmin1 = hplus[j - 1]; - } - else { - hsmin1 = 2 * r[0]; // across the origin - } - // Across and DB_int updates - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - stencil = stencil_cur; - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - ptr = ptr_vect[i + 1]; - - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val2; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - ptr = ptr_vect[iplus(i, ntheta_int)]; - row = row_vect[iplus(i, ntheta_int)]; - col = (j + 1) * ntheta_int + i; - val = art_vect[i]; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - - // Update (j, i-1) - ptr = ptr_vect[imoins(i, ntheta_int)]; - row = row_vect[imoins(i, ntheta_int)]; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] -= val; - } - } - } - - // Update (j+1, i) - if (j < delete_circles - 1 && smoother_next == smoother) { - stencil = get_stencil_sc(j + 1, smoother, 1); - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - ptr = ptr_vect_next[i]; - - row = row_vect_next[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - val = -coeff; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - ptr = ptr_vect_next[i]; - - row = row_vect_next[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = -art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = art_vect[i]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] += val2; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! RADIAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - if (smoother > 1) { - int diff = ntheta_int % 3; - int odd_d = delete_circles % 2; - - for (int i = 0; i < ntheta_int; i++) { - { - int im = imoins(i, ntheta_int); - int ip = iplus(i, ntheta_int); - int im2 = imoins(im, ntheta_int); - int ip2 = iplus(ip, ntheta_int); - int odd_i = i % 2; - int ind_m_odd = i, ind_p_odd = i; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } - - int s_cur = (i % 2) + 2; - int s_next = ((i + 1) % 2) + 2; - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother_cur = s_cur; - smoother_prev = s_next; - smoother_next = s_next; - row_vect_prev = get_row_i_glob(nr, im, smoother_prev, extrapol); - row_vect = get_row_i_glob(nr, i, smoother_cur, extrapol); - row_vect_next = get_row_i_glob(nr, ip, smoother_next, extrapol); - gyro::arr_att_art(r, theta[i], arr_vect, att_vect, art_vect, 0); - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - int smoother_prev_circle = get_smoother(i, j - 1); - int smoother_cur_left = get_smoother(im, j); - int smoother_cur_circle = get_smoother(i, j); - int smoother_cur_right = get_smoother(ip, j); - int smoother_next_circle = get_smoother(i, j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev_circle, 1); - ptr_vect = get_ptr_sc(j, smoother_cur_circle, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next_circle, 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev_circle, 1); - stencil_cur_left = get_stencil_sc(j, smoother_cur_left, 1); - stencil_cur = get_stencil_sc(j, smoother_cur_circle, 1); - stencil_cur_right = get_stencil_sc(j, smoother_cur_right, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next_circle, 1); - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += -coeff; - - if (gyro::icntl[Param::mod_pk] > 0) { - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] += val2; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - j = delete_circles; - smoother_prev_circle = get_smoother(i, j - 1); - smoother_cur_left = get_smoother(im, j); - smoother_cur_circle = get_smoother(i, j); - smoother_cur_right = get_smoother(ip, j); - smoother_next_circle = get_smoother(i, j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev_circle, 1); - ptr_vect = get_ptr_sc(j, smoother_cur_circle, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next_circle, 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev_circle, 1); - stencil_cur_left = get_stencil_sc(j, smoother_cur_left, 1); - stencil_cur = get_stencil_sc(j, smoother_cur_circle, 1); - stencil_cur_right = get_stencil_sc(j, smoother_cur_right, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next_circle, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val2; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - stencil = stencil_cur; - // Update (j, i+1) - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / kt; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / ktmin1; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += -coeff; - } - } - // Update (j+1, i) (Not in DB_ext) - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - } - else { - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val2; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row2 = row_vect_prev[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] -= val2; - } - } - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j+1, i) - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] += val2; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (j = delete_circles + 1; j < nr_int - 1; j++) { - smoother_prev_circle = get_smoother(i, j - 1); - smoother_cur_left = get_smoother(im, j); - smoother_cur_circle = get_smoother(i, j); - smoother_cur_right = get_smoother(ip, j); - smoother_next_circle = get_smoother(i, j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev_circle, 1); - ptr_vect = get_ptr_sc(j, smoother_cur_circle, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next_circle, 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev_circle, 1); - stencil_cur_left = get_stencil_sc(j, smoother_cur_left, 1); - stencil_cur = get_stencil_sc(j, smoother_cur_circle, 1); - stencil_cur_right = get_stencil_sc(j, smoother_cur_right, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next_circle, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - // coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val2; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - // Update (j, i) - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val2; - } - else { - - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - - // Update (j+1, i) - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] += val2; - - // Update (j+1, i) - stencil = stencil_next; - ptr = ptr_vect_next[i]; - row2 = row_vect[j + 1]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] -= val; - - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row2; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val2; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val2; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] -= val2; - } - } - } - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - j = nr_int - 1; - smoother_prev_circle = get_smoother(i, j - 1); - smoother_cur_left = get_smoother(im, j); - smoother_cur_circle = get_smoother(i, j); - smoother_cur_right = get_smoother(ip, j); - smoother_next_circle = get_smoother(i, j + 1); - ptr_vect_prev = get_ptr_sc(j - 1, smoother_prev_circle, 1); - ptr_vect = get_ptr_sc(j, smoother_cur_circle, 1); - ptr_vect_next = get_ptr_sc(j + 1, smoother_next_circle, 1); - stencil_prev = get_stencil_sc(j - 1, smoother_prev_circle, 1); - stencil_cur_left = get_stencil_sc(j, smoother_cur_left, 1); - stencil_cur = get_stencil_sc(j, smoother_cur_circle, 1); - stencil_cur_right = get_stencil_sc(j, smoother_cur_right, 1); - stencil_next = get_stencil_sc(j + 1, smoother_next_circle, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - // Update (j, i) - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff3 / ktmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - col2 = j * ntheta_int + ip; - val2 = -coeff3 / kt; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val2; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - stencil = stencil_cur; - // Update (j, i+1) - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::left]] += val; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::right]] += val; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 0) { - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top]] += val; - } - else { - // Update (j, i) - stencil = stencil_cur; - ptr = ptr_vect[i]; - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom]] += val; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - stencil = stencil_prev; - ptr = ptr_vect_prev[i]; - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_left]] += val; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::top_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::top_right]] = col2; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::top_right]] += val2; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - stencil = stencil_cur; - // Update (j, i+1) - stencil = stencil_cur_right; - ptr = ptr_vect[ip]; - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_left]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_left]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_left]] += val; - - // Update (j, i-1) - stencil = stencil_cur_left; - ptr = ptr_vect[im]; - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - A_Zebra_Mix_r[smoother][ptr + stencil[Param::bottom_right]] = row; - A_Zebra_Mix_c[smoother][ptr + stencil[Param::bottom_right]] = col; - A_Zebra_Mix_v[smoother][ptr + stencil[Param::bottom_right]] -= val; - } - } - } - } - } - } -} /* ----- end of level::build_Asc_ortho ----- */ - -/*! \brief Applies the matrix A_sc_ortho for a smoother explicitely on the level l - * - * Asc_ortho corresponds to all lines of a smoother s with colour c and the columns not in Asc - * - * \param smoother_todo: the smoother of this Asc_ortho matrix -*/ -void level::apply_Asc_ortho(std::vector& Au, std::vector& u, int smoother_todo, int v, int c, - int* dep_Asc_cur, int* dep_Asc_prev, int* dep_Asc1, int* dep_Asc_ortho_cur) -{ - int start_j; - int extrapol = gyro::icntl[Param::extrapolation] == 1 && l == 0; - - int smoother = smoother_todo; - int base_prec; - if (smoother == 1) - base_prec = delete_circles + 1; - else if (smoother == 0) - base_prec = -(delete_circles + 1); - else if (smoother == 3) - base_prec = ntheta_int; - else if (smoother == 2) - base_prec = -ntheta_int; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Circle Smoother !!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // Take boundary condition into account: Dirichlet-RB - if (gyro::icntl[Param::DirBC_Interior]) { // (r[0],0) is on Dirichlet boundary - dep_Asc_ortho[0][0] = 1; - dep_Asc_ortho[1][0] = 1; - start_j = 1; - } - else { // (r[0],0) is not on Dirichlet boundary - start_j = 0; - } - - if (smoother < 2) { - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (circle) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - int j = delete_circles; - int odd_j = j % 2; - -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) depend(in \ - : dep_Asc_prev[j - 1]) \ - depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, col, col2; - int smoother_prev; - double coeff, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - smoother_prev = get_smoother(0, j - 1); - smoother_vect = get_smoother_radial(j); - smoother_vect_next = get_smoother_radial(j + 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, 2, extrapol, 0, 1); - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_prev == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - dep_Asc_ortho_cur[j] = 1; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - odd_j = j % 2; -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) depend(in \ - : dep_Asc_prev[j - odd_j]) \ - depend(in \ - : dep_Asc_ortho_cur[j + 1]) depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, row2, col, col2; - int smoother_prev, smoother_cur; - double coeff, coeff2, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - if (delete_circles > 2 || !gyro::icntl[Param::DirBC_Interior]) { - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_vect_next = get_smoother_radial(j + 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - else if (smoother_prev == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - else if (smoother_prev == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - } - dep_Asc_ortho_cur[j] = 1; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes (1) !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = delete_circles - 4; j > start_j; j -= 3) { - odd_j = j % 2; -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) \ - depend(in \ - : dep_Asc_prev[j - odd_j], dep_Asc_prev[j + odd_j]) depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_next = get_smoother(0, j + 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect_next[i]; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - - // Update (j+1, i) - row = row_vect_next[i]; - val = -art_vect[i]; - val2 = art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - } - dep_Asc_ortho_cur[j] = 1; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes (2) !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = delete_circles - 2; j > start_j; j -= 3) { - odd_j = j % 2; -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) \ - depend(in \ - : dep_Asc_prev[j - odd_j], dep_Asc_prev[j + odd_j], dep_Asc_ortho_cur[j + 1]) \ - depend(in \ - : dep_Asc_ortho_cur[j - 2]) depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_next = get_smoother(0, j + 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect_next[i]; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - - // Update (j+1, i) - row = row_vect_next[i]; - val = -art_vect[i]; - val2 = art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - } - dep_Asc_ortho_cur[j] = 1; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes (3) !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int j = delete_circles - 3; j > start_j; j -= 3) { - odd_j = j % 2; -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) \ - depend(in \ - : dep_Asc_prev[j - odd_j], dep_Asc_prev[j + odd_j], dep_Asc_ortho_cur[j + 1]) \ - depend(in \ - : dep_Asc_ortho_cur[j - 2]) depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - smoother_prev = get_smoother(0, j - 1); - smoother_cur = get_smoother(0, j); - smoother_next = get_smoother(0, j + 1); - row_vect_prev = get_row(j - 1, smoother_prev, extrapol, 0, 1); - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect_next[i]; - col = j * ntheta_int + i; - - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother_cur == smoother) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - row2 = row_vect[imoins(i, ntheta_int)]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[i]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[i]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - else { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j-1, i) - row = row_vect_prev[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = -art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - - // Update (j+1, i) - row = row_vect_next[i]; - val = -art_vect[i]; - val2 = art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - } - dep_Asc_ortho_cur[j] = 1; - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! First lines !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = start_j; - odd_j = j % 2; -#pragma omp task shared(u, Au) firstprivate(smoother, j, odd_j) \ - depend(in \ - : dep_Asc_prev[j - odd_j], dep_Asc_prev[j + odd_j], dep_Asc_ortho_cur[j + 1]) \ - depend(in \ - : dep_Asc_ortho_cur[j + 2]) depend(out \ - : dep_Asc_ortho_cur[j]) - { - int start_loop, shift_loop; - int row, col, col2; - int smoother_cur, smoother_next; - double coeff, coeff2, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - smoother_cur = j; - row_vect = get_row(j, smoother_cur, extrapol, 0, 1); - if (j < delete_circles - 1) { - smoother_next = (j + 1) % 2; - row_vect_next = get_row(j + 1, smoother_next, extrapol, 0, 1); - } - else if (j == delete_circles - 1) { - smoother_vect_next = get_smoother_radial(j + 1); - smoother_next = smoother_vect_next[0]; - row_vect_next = get_row(j + 1, 2, extrapol, 0, 1); - } - - hs = hplus[j]; - if (j > 0) { - hsmin1 = hplus[j - 1]; - } - else { - hsmin1 = 2 * r[0]; // across the origin - } - // Across and DB_int updates - gyro::arr_att_art(r[j], theta, sin_theta, cos_theta, ntheta_int, arr_vect, att_vect, art_vect, 0); - if (smoother_cur == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[i]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - Au[row] -= val * u[col]; - } - if (extrapol && smoother == 0) { - start_loop = 0; - shift_loop = 2; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i) - row = row_vect[iplus(i, ntheta_int)]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[i]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - - // Update (j, i) - kt = thetaplus_per[i + 2]; - ktmin1 = thetaplus_per[i + 1]; - row = row_vect[i + 1]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[i + 1]; - col = j * ntheta_int + imoins(i + 1, ntheta_int); - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + iplus(i + 1, ntheta_int); - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - start_loop = 0; - if (extrapol && smoother == 0) - shift_loop = 2; - else - shift_loop = 1; - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - // Update (j, i+1) - row = row_vect[iplus(i, ntheta_int)]; - col = (j + 1) * ntheta_int + i; - val = art_vect[i]; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect[imoins(i, ntheta_int)]; - - Au[row] -= -val * u[col]; - } - } - } - - // Update (j+1, i) - if (j < delete_circles - 1 && smoother_next == smoother) { - if (extrapol && smoother == 0) { - start_loop = 1; - shift_loop = 2; - } - else { - start_loop = 0; - shift_loop = 1; - } - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - - row = row_vect_next[i]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[i] / hs; - - val = -coeff; - - Au[row] -= val * u[col]; - } - if (gyro::icntl[Param::mod_pk] > 0) - for (int i = start_loop; i < ntheta_int; i += shift_loop) { - row = row_vect_next[i]; - col = j * ntheta_int + imoins(i, ntheta_int); - val = -art_vect[i]; - col2 = j * ntheta_int + iplus(i, ntheta_int); - val2 = art_vect[i]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - dep_Asc_ortho_cur[j] = 1; - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! RADIAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - if (smoother > 1) { - int diff = ntheta_int % 3; - int odd_d = delete_circles % 2; - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! (0)) !!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - for (int i = 0; i < diff; i++) { - { - int im = imoins(i, ntheta_int); - int ip = iplus(i, ntheta_int); - int im2 = imoins(im, ntheta_int); - int ip2 = iplus(ip, ntheta_int); - int odd_i = i % 2; - int ind_m_odd = i, ind_p_odd = i; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } -#pragma omp task shared(u, Au) firstprivate(smoother, im, i, ip, im2, ip2, odd_i, odd_d) \ - depend(in \ - : dep_Asc_prev[ind_m_odd]) depend(in \ - : dep_Asc_prev[ind_p_odd], dep_Asc1[delete_circles - 1 - odd_d]) \ - depend(in \ - : dep_Asc_ortho_cur[i - 1]) depend(out \ - : dep_Asc_ortho_cur[i]) - { - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - int j; - int s_cur = (i % 2) + 2; - int s_next = ((i + 1) % 2) + 2; - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother_cur = s_cur; - smoother_prev = s_next; - smoother_next = s_next; - row_vect_prev = get_row_i_glob(nr, im, smoother_prev, extrapol); - row_vect = get_row_i_glob(nr, i, smoother_cur, extrapol); - row_vect_next = get_row_i_glob(nr, ip, smoother_next, extrapol); - gyro::arr_att_art(r, theta[i], arr_vect, att_vect, art_vect, 0); - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - if (gyro::icntl[Param::mod_pk] > 0) { - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - j = delete_circles; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / kt; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / ktmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - Au[row] -= val * u[col]; - } - else { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - row2 = row_vect_prev[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (j = delete_circles + 1; j < nr_int - 1; j++) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - // coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - else { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - row2 = row_vect[j + 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j+1, i) - Au[row2] -= -val; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= -val; - } - } - } - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - j = nr_int - 1; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff3 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff3 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 0) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - else { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= -val * u[col]; - } - } - } - } - dep_Asc_ortho_cur[i] = 1; - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! (1)) !!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int i = diff; i < ntheta_int; i += 3) { - { - int im = imoins(i, ntheta_int); - int ip = iplus(i, ntheta_int); - int im2 = imoins(im, ntheta_int); - int ip2 = iplus(ip, ntheta_int); - int odd_i = i % 2; - int ind_m_odd = i, ind_p_odd = i; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } -#pragma omp task shared(u, Au) firstprivate(smoother, im, i, ip, im2, ip2, odd_i) depend(in \ - : dep_Asc_prev[ind_m_odd]) \ - depend(in \ - : dep_Asc_prev[ind_p_odd], dep_Asc_ortho_cur[diff - 2], dep_Asc_ortho_cur[diff - 1]) \ - depend(out \ - : dep_Asc_ortho_cur[i]) - { - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - int j; - int s_cur = (i % 2) + 2; - int s_next = ((i + 1) % 2) + 2; - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother_cur = s_cur; - smoother_prev = s_next; - smoother_next = s_next; - row_vect_prev = get_row_i_glob(nr, im, smoother_prev, extrapol); - row_vect = get_row_i_glob(nr, i, smoother_cur, extrapol); - row_vect_next = get_row_i_glob(nr, ip, smoother_next, extrapol); - gyro::arr_att_art(r, theta[i], arr_vect, att_vect, art_vect, 0); - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - if (gyro::icntl[Param::mod_pk] > 0) { - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - j = delete_circles; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / kt; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / ktmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - Au[row] -= val * u[col]; - } - else { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - row2 = row_vect_prev[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (j = delete_circles + 1; j < nr_int - 1; j++) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - // coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - else { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - row2 = row_vect[j + 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j+1, i) - Au[row2] -= -val; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= -val; - } - } - } - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - j = nr_int - 1; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff3 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff3 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 0) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - else { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= -val * u[col]; - } - } - } - } - dep_Asc_ortho_cur[i] = 1; - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! (2)) !!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int i = diff + 1; i < ntheta_int; i += 3) { - { - int im = imoins(i, ntheta_int); - int ip = iplus(i, ntheta_int); - int im2 = imoins(im, ntheta_int); - int ip2 = iplus(ip, ntheta_int); - int odd_i = i % 2; - int ind_m_odd = i, ind_p_odd = i; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } -#pragma omp task shared(u, Au) firstprivate(smoother, im, i, ip, im2, ip2, odd_i) depend(in \ - : dep_Asc_prev[ind_m_odd]) \ - depend(in \ - : dep_Asc_prev[ind_p_odd], dep_Asc_ortho_cur[im], dep_Asc_ortho_cur[ip2]) depend(out \ - : dep_Asc_ortho_cur[i]) - { - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - int j; - int s_cur = (i % 2) + 2; - int s_next = ((i + 1) % 2) + 2; - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother_cur = s_cur; - smoother_prev = s_next; - smoother_next = s_next; - row_vect_prev = get_row_i_glob(nr, im, smoother_prev, extrapol); - row_vect = get_row_i_glob(nr, i, smoother_cur, extrapol); - row_vect_next = get_row_i_glob(nr, ip, smoother_next, extrapol); - gyro::arr_att_art(r, theta[i], arr_vect, att_vect, art_vect, 0); - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - if (gyro::icntl[Param::mod_pk] > 0) { - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - j = delete_circles; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / kt; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / ktmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - Au[row] -= val * u[col]; - } - else { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - row2 = row_vect_prev[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (j = delete_circles + 1; j < nr_int - 1; j++) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - // coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - else { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - row2 = row_vect[j + 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j+1, i) - Au[row2] -= -val; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= -val; - } - } - } - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - j = nr_int - 1; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff3 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff3 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 0) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - else { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= -val * u[col]; - } - } - } - } - dep_Asc_ortho_cur[i] = 1; - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! (3)) !!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (int i = diff + 2; i < ntheta_int; i += 3) { - { - int im = i - 1; - int ip = iplus(i, ntheta_int); - int im2 = imoins(im, ntheta_int); - int ip2 = iplus(ip, ntheta_int); - int odd_i = i % 2; - int ind_m_odd = i, ind_p_odd = i; - if (odd_i) { - ind_m_odd = im; - ind_p_odd = ip; - } -#pragma omp task shared(u, Au) firstprivate(smoother, im, i, ip, im2, ip2, odd_i) depend(in \ - : dep_Asc_prev[ind_m_odd]) \ - depend(in \ - : dep_Asc_prev[ind_p_odd], dep_Asc_ortho_cur[im], dep_Asc_ortho_cur[ip2]) depend(out \ - : dep_Asc_ortho_cur[i]) - { - int row, row2, col, col2; - int smoother_prev, smoother_cur, smoother_next; - double coeff, coeff2, coeff3, kt, ktmin1, hs, hsmin1, val, val2; - std::vector row_vect_prev, row_vect, row_vect_next; - std::vector smoother_vect_prev, smoother_vect, smoother_vect_next; - std::vector arr_vect, arr_vect2, att_vect, art_vect; - - int j; - int s_cur = (i % 2) + 2; - int s_next = ((i + 1) % 2) + 2; - kt = thetaplus_per[i + 1]; - ktmin1 = thetaplus_per[i]; - smoother_cur = s_cur; - smoother_prev = s_next; - smoother_next = s_next; - row_vect_prev = get_row_i_glob(nr, im, smoother_prev, extrapol); - row_vect = get_row_i_glob(nr, i, smoother_cur, extrapol); - row_vect_next = get_row_i_glob(nr, ip, smoother_next, extrapol); - gyro::arr_att_art(r, theta[i], arr_vect, att_vect, art_vect, 0); - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Circle-Radial (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - j = delete_circles - 1; - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - if (gyro::icntl[Param::mod_pk] > 0) { - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Link Radial-Circle (radial) !!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - - j = delete_circles; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / kt; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j] / ktmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - - Au[row] -= val * u[col]; - } - else { - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (!(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - row2 = row_vect_prev[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - Au[row2] -= -val; - } - } - if (!(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + im; - val = -art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - } - - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!! Interior nodes !!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - for (j = delete_circles + 1; j < nr_int - 1; j++) { - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j, i) - row = row_vect[j]; - // coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - coeff2 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff2 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff2 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 1) { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j + 1) * ntheta_int + i; - val = -coeff / hs; - col2 = (j - 1) * ntheta_int + i; - val2 = -coeff / hsmin1; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - else { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - - // Update (j+1, i) - row = row_vect[j + 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hs; - val = -coeff; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - row2 = row_vect[j + 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j+1, i) - Au[row2] -= -val; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= val; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - col2 = (j + 1) * ntheta_int + i; - val2 = art_vect[j]; - - val = val * u[col] + val2 * u[col2]; - Au[row] -= -val; - } - } - } - } - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!! Last lines !!!!!!!!!!!!!!!!!!!!!!!! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - // DB_ext updates (~~~ Interior - (j+1, i) + DB) - j = nr_int - 1; - hs = hplus[j]; - hsmin1 = hplus[j - 1]; - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - row = row_vect[j]; - // Contribution to middle (top) from DB - coeff3 = 0.5 * (hs + hsmin1) * att_vect[j]; - col = j * ntheta_int + im; - val = -coeff3 / ktmin1; - col2 = j * ntheta_int + ip; - val2 = -coeff3 / kt; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - // Update (j, i+1) - row = row_vect_next[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / kt; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = j * ntheta_int + i; - coeff = 0.5 * (hs + hsmin1) * att_vect[j]; - val = -coeff / ktmin1; - - Au[row] -= val * u[col]; - } - } - if (extrapol && smoother == 2 && i % 2 == 0) { - if (j % 2 == 0) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + i; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j] / hsmin1; - val = -coeff; - - Au[row] -= val * u[col]; - } - else { - // Update (j, i) - row = row_vect[j]; - coeff = 0.5 * (kt + ktmin1) * arr_vect[j]; - col = (j - 1) * ntheta_int + i; - val = -coeff / hsmin1; - - Au[row] -= val * u[col]; - } - } - if (gyro::icntl[Param::mod_pk] > 0) { - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 1)) { - if ((smoother == 3 && i % 2 == 1) || (smoother == 2 && i % 2 == 0)) { - // Update (j-1, i) - row = row_vect[j - 1]; - col = j * ntheta_int + im; - val = art_vect[j]; - col2 = j * ntheta_int + ip; - val2 = -art_vect[j]; - - Au[row] -= val * u[col] + val2 * u[col2]; - } - } - if (smoother > 1 && !(extrapol && smoother == 2 && j % 2 == 0)) { - if ((smoother == 3 && i % 2 == 0) || (smoother == 2 && i % 2 == 1)) { - row = row_vect_next[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= val * u[col]; - - // Update (j, i-1) - row = row_vect_prev[j]; - col = (j - 1) * ntheta_int + i; - val = -art_vect[j]; - - Au[row] -= -val * u[col]; - } - } - } - } - dep_Asc_ortho_cur[i] = 1; - } - } - } -} /* ----- end of level::apply_Asc_ortho ----- */ diff --git a/src/smoother0.cpp b/src/smoother0.cpp deleted file mode 100644 index 7d86c6fb..00000000 --- a/src/smoother0.cpp +++ /dev/null @@ -1,1019 +0,0 @@ -/* -* Copyright (C) 2019-2023 The GMGPolar Development Team -* -* Authors: Philippe Leleux, Christina Schwarz, Martin J. Kühn, Carola Kruse, Ulrich Rüde -* -* Contact: -* Carola Kruse -* Martin J. Kuehn -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -/*! - * \file multigrid_iter.cpp - * \brief Implementation of the smoother (deprecated) - * \author M. Kuehn, C. Kruse, P. Leleux, C. Schwarz - * \version 0.0 - */ - -#include "level.h" - -/*! \brief Applies smoothing - * - * For all lines of the smoother s and the colour c. - * The matrix A_sc is for all lines of points of the smoother s/c. - * The result is in u (or u_previous_cu_previous_r). - * - * if gyro::icntl[Param::smoother]= - * - 3: block Gauss Seidel for all 4 smoothers. - * - 13: block Jacobi between Circle and Radial, and block Gauss Seidel for B/W inside each. - * - * \param smoother: the smoother -*/ -void level::multigrid_smoothing0(int smoother) -{ - //std::cout << "\n---------------- smoother: " << smoother << std::endl; - - double t, t_smoothing_tmp; - TIC; - t_smoothing_tmp = t; - - //! solving for u_sc (solution vector) - std::vector u_sc; - - //create f_sc - std::vector f_sc; - build_fsc0(f_sc, smoother); - - t_f_sc += TOC; - TIC; - - //compute f_total = f_sc - A_sc_ortho * u - //size of u_sc for the definition of size of A_sc_ortho = size of f_sc - std::vector f_total(m_sc[smoother], 0); - apply_Asc_ortho0(f_total, smoother); - - for (long unsigned int i = 0; i < f_total.size(); ++i) { - f_total[i] = f_sc[i] - f_total[i]; - } - - t_Asc_ortho += TOC; - TIC; - -#ifdef GMGPOLAR_USE_MUMPS - if (gyro::icntl[Param::optimized] == 0) { -#endif - u_sc = - solve_gaussian_elimination(A_Zebra_r_LU[smoother], A_Zebra_c_LU[smoother], A_Zebra_v_LU[smoother], f_total); -#ifdef GMGPOLAR_USE_MUMPS - } - else - u_sc = solve_mumps(mumps_A_Zebra[smoother], f_total); -#endif - - if (gyro::icntl[Param::verbose] > 5) - gyro::disp(u_sc, "u_sc"); - - t_Asc += TOC; - TIC; - - //------------------------------------------------------------------------------------------- - //! insert the solution vector u_sc into the whole vector u, depending on the smoother/colour - int extrapol = gyro::icntl[Param::extrapolation]; - //only for the circle black smoother, don't change the variable of the class itself - int ntheta_int_local = ntheta_int; - if (extrapol == 1 && l == 0 && smoother == 0) { //circle, black - ntheta_int_local = ntheta_int / 2; - } - int n_lines_radial_b = ceil((double)ntheta_int / 2); - int n_lines_radial_w = floor((double)ntheta_int / 2); - - //computation of indices in the total vector u corresponding to the indices in u_sc - for (long unsigned int i = 0; i < u_sc.size(); ++i) { - int row; - int col; - - if (smoother < 2) { //circle - row = i / ntheta_int_local; //row within the smoother - row = row * 2; //row within the whole matrix - col = i % ntheta_int_local; - if (smoother == 1) { //white - row++; - } - if (extrapol == 1 && l == 0 && smoother == 0) { //black - col = col * 2 + 1; //augment col in case of extrapolation - } - } - else { //radial - if (smoother == 2) { //black - row = i / n_lines_radial_b; //row within the smoother - col = i % n_lines_radial_b; //col within the smoother - col = col * 2; //col within the whole matrix - if (extrapol == 1 && l == 0) { - row = row * 2; //augment row in case of extrapolation - if (delete_circles % 2 == 0) { //delete_circles = even - row = row + 1; - } - } - } - else { //white - row = i / n_lines_radial_w; //row within the smoother - col = i % n_lines_radial_w; //col within the smoother - col = col * 2 + 1; //col within the whole matrix - } - row += delete_circles; //row within the whole matrix - } - - int index = row * ntheta_int + col; - - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - u_previous_c[index] = u_sc[i]; - } - else { //radial - u_previous_r[index] = u_sc[i]; - } - } - else { - u[index] = u_sc[i]; - } - } - - t_f_sc += TOC; - TIC; - - t = t_smoothing_tmp; - t_smoothing += TOC; - //std::cout << "smoothing end \n"; -} - -/*! \brief Create the RHS part corresponding to Asc_ortho for a smoother (on level l) - * - * Create f_sc, i.e. the RHS part corresponding to Asc_ortho for a smoother (on level l) - * - * \param f_sc: the RHS part (out) - * \param smoother: the smoother -*/ -void level::build_fsc0(std::vector& f_sc, int smoother) -{ - int n_indices_circle = delete_circles * ntheta_int; //delete_circles = index of radius of border between smoothers - int extrapol = gyro::icntl[Param::extrapolation]; - - if (smoother == 0) { //circle black smoother - if (extrapol == 1 && l == 0) { //extrapolation - //skip every second element - for (int ind = 1; ind < n_indices_circle; ind = ind + 2) { //iteration over all elements in the smoother - int r_index = ind / ntheta_int; //index in r-direction - //check if even r_index - if (!(r_index % 2)) { - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - } - else { //no extrapolation - for (int ind = 0; ind < n_indices_circle; ++ind) { //iteration over all elements in the smoother - int r_index = ind / ntheta_int; //index in r-direction - //check if even r_index - if (!(r_index % 2)) { - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - } - } - else if (smoother == 1) { //circle white smoother - for (int ind = 0; ind < n_indices_circle; ++ind) { //iteration over all elements in the smoother - int ind_local = ind; - int r_index = ind_local / ntheta_int; //index in r-direction - //check odd r_index - if (r_index % 2) { - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - } - else if (smoother == 2) { //radial black smoother - //skip every second row - for (int ind = n_indices_circle; ind < m; ++ind) { //iteration over all elements in the smoother - int r_index = ind / ntheta_int; //index in r-direction - int theta_index = ind - r_index * ntheta_int; //index in theta-direction - - //check if black (even theta_index) or white (odd theta_index) - if (extrapol == 1 && l == 0) { //extrapolation - if (!(theta_index % 2) && r_index % 2) { //radial black, even theta_index, uneven row_index - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - else { //no extrapolation - if (!(theta_index % 2)) { //radial black, even - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - } - } - else { //radial white smoother - for (int ind = n_indices_circle; ind < m; ++ind) { //iteration over all elements in the smoother - int r_index = ind / ntheta_int; //index in r-direction - int theta_index = ind - r_index * ntheta_int; //index in theta-direction - if (theta_index % 2) { //radial white, odd - f_sc.push_back(fVec[ind]); //insert elements of f corresponding to the colour - } - } - } -} /* ----- end of level::build_subvectors ----- */ - -/*! \brief Build the matrix A_sc explicitely on the level l (deprecated) - * - * Asc corresponds to all lines of a smoother s with colour c - * so we need to build 4 matrices Asc for the 4 smoothers on the level l, all stored in A_Zebra - * 0,1: circular white/black - * 2,3: radial white/black - * - * this function is called only once at the beginning to build the matrices Asc on all levels - * the matrix should contain only the parts corresponding to (s/c), - * thus it is not of size m, but smaller (number of points corresponding to the smoother s/c), - * so we need to treat the indices (!) -*/ -void level::build_Asc0() -{ - //smoother=0 (circle), smoother=1 (radial), (0: white, 1: black) - - // if boundary is only defined on radius, checks for wrongly detected boundary - // nodes due to rounding errors (double checking...) - double tol_bound_check = 1e-8; - int smoother = 0; - int extrapol = gyro::icntl[Param::extrapolation]; - - A_Zebra_r.assign(4, std::vector()); - A_Zebra_c.assign(4, std::vector()); - A_Zebra_v.assign(4, std::vector()); - - int n_cols_radial = ntheta_int / 2; - int col; - // double x, y; - double val; - int extrapol_fine_node; //indicates if we have extrapolation on level 0 AND a fine node - // to count the fine nodes, to know the index without the coarse nodes - std::vector count_nodes = {0, 0, 0, 0}; //cb, cw, rb, rw - - //! Take boundary condition into account in the operator; inner circle is part of the circle smoother (black) - // gyro::trafo(r[0], theta[0], x, y, 0); - //check if r0 is on the boundary, if so, we have Diriclet BC - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { - // if (r[0] != gyro::dcntl[Param::r0_DB]) { - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // } - // Dirichlet-RB (the inner circle, that is on the Diriclet boundary, just insert "ones" on the diagonal) - for (int i = 0; i < ntheta_int; i++) { - extrapol_fine_node = 0; - //only in case of extrapolation on level 0 - if (extrapol == 1 && l == 0) { - if (coarse_nodes_list_theta[i] == -1 || coarse_nodes_list_r[0] == -1) { - //if the index is -1 in both lists, we have a fine node, otherwise the node is coarse - extrapol_fine_node = 1; - } - else { - continue; //the node is coarse, so we can skip this index, continue with next i in for-loop - } - } - - //if we have no extrapolation - //or if we have extrapolation but are not on level 0 - //or if we have extrapolation on level 0, and the node is fine - - count_nodes[smoother]++; - int index = count_nodes[smoother] - 1; - - A_Zebra_r[smoother].push_back(index); //just take indices of first line (r0), (j=0) - A_Zebra_c[smoother].push_back(index); - - A_Zebra_v[smoother].push_back(1.0); - } - } - - //! check if we start at j=0 (across the origin) or j=1 (Diriclet boundary) - // gyro::trafo(r[0], theta[0], x, y, 0); - int start_j; - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { //check if r0 is on the boundary - // if (fabs(gyro::distBoundary(x, y, 0)) < tol_bound_check && r[0] != gyro::dcntl[Param::r0_DB]) - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - start_j = 1; //Diriclet - } - // dirBound([r(1),0])>0 means that (r(1),0) is not on Dirichlet boundary - else { - // if (fabs(gyro::distBoundary(x, y, 0)) > tol_bound_check && r[0] == gyro::dcntl[Param::r0_DB]) { - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // } - start_j = 0; //across the origin - } - - // % -------------------------------------------------------------------------------------------------- % - //!Iteration over all points! - for (int j = start_j; j < nr_int; j++) { // start with second circle (j=1), as we already treated the origin(j=0) - for (int i = 0; i < ntheta_int; i++) { - //!extrapolation: check if we have a fine or a coarse node - extrapol_fine_node = 0; - if (extrapol == 1 && l == 0) { //only do this in case of extrapolation and level 0 - if (coarse_nodes_list_theta[i] == -1 || coarse_nodes_list_r[j] == -1) { - extrapol_fine_node = 1; //the node is fine - } - else { - continue; //the node is coarse, so we can skip this index, go on with next i in for-loop - } - } - - //!check, which smoother the point belongs to: 0 circle black, 1 circle white, 2 radial black, 3 radial white - if (j < delete_circles) { - if (j % 2 == 0) { - smoother = 0; //circle black (even) - } - else { - smoother = 1; //circle white (odd) - } - } - else { - if (i % 2 == 0) { - smoother = 2; //radial black (even) - //odd number of points in theta-direction, we have one additional black colom - if (ntheta_int % 2) { - n_cols_radial = ntheta_int / 2 + 1; - } - } - else { - smoother = 3; //radial white (odd) - } - } - - //!compute the index of the point in the grid depending on the smoother (the index in the matrix) - count_nodes[smoother]++; - int index = count_nodes[smoother] - 1; //index of the point (i,j) - - //!variables for the calculation of vals - double kt = thetaplus[i]; //k_j - double thetamin1; //the coordinate of theta to the left - double thetap1 = 0; - double ktmin1; //k_j-1 - double hs; //h_i - double hsmin1; //h_i-1 - - if (i > 0) { //normal case - thetamin1 = theta[i - 1]; - ktmin1 = thetaplus[i - 1]; - } - else { //i==0, on the left of the domain, take periodic BCs into acount - thetamin1 = theta[ntheta_int - 1]; // equal to 2*PI-ktmin1 - ktmin1 = thetaplus[ntheta_int - 1]; - } - hs = hplus[j]; - if (j > 0) { - hsmin1 = hplus[j - 1]; - } - else { - hsmin1 = 2 * r[0]; // across the origin - } - - // % -------------------------------------------------------------------------------------------------- % - // 9-Point Stencil (attention order: bottom, bottom left, left, top left, top, top right, right, bottom right, middle) - - //check if we have a black point --> fine black point has two coarse neighbours and thus we only treat the middle - //skip bottom/left/top/right if we have a fine black point - int fine_black_point = 0; - if (extrapol_fine_node == 1 && (smoother == 0 || smoother == 2)) { - fine_black_point = 1; - } - //! bottom (r - h-) (only radial smoother) (and circle smoother with across-the-origin) - // (as every fine point has two coarse nodes as neighbours, this entry is shifted to the rhs --> Asc_ortho) - if ((fine_black_point == 0 && smoother > 1 && j != delete_circles) || (smoother == 0 && j == 0)) { - //std::cout << ", bottom"; - //first row of radial smoother: link to the circle smoother --> A_sc_ortho - //across the origin (for j=0): link of points of inner circle --> A_sc - - // if (j == 1) { // j=1 means r-h is on the boundary, for Diriclet - // gyro::trafo(r[j - 1], theta[i], x, y, 0); - // } - if (j == 1 && fabs(gyro::distBoundary(r[j - 1], theta[i], 0)) < tol_bound_check) { - //empty - //for r1: r0 is on the boundary (for Diriclet BC) - //we don't treat the bottom point for r1 as it is connected to the boundary (r0) and we thus bring it to the rhs - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - if (j > 0) { - // to u at r-h geometrically recorded (i.e. -ntheta_int nodes at slice sorting) - col = index - n_cols_radial; - } - else { //j=0: across the origin - int shift; - if (extrapol == 1 && l == 0) - shift = n_cols_radial / 2; - else - shift = ntheta_int / 2; - if (i + 1 > ntheta_int / 2) { - col = index - shift; // half a turn back - } - else { - col = index + shift; // half a turn further - } - } - if (j > 0) { - - val = -0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)); - } - else { // j==0; across the origin, just use r_{s-1}=0 - - val = -0.5 * (kt + ktmin1) / hsmin1 * - (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j], theta[i] + PI, 0)); - } - - if (val != 0) { - A_Zebra_v[smoother].push_back(val); - A_Zebra_r[smoother].push_back(index); - A_Zebra_c[smoother].push_back(col); - } - } - } - if (fine_black_point == 0) { //Extrapolation: skip, if we have a fine point (only for the black smoother) - //! left (phi-k) (only circle smoother) - if (smoother < 2) { - //std::cout << ", left"; - val = -0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) - - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - - if (val != 0) { - A_Zebra_v[smoother].push_back(val); - A_Zebra_r[smoother].push_back(index); - - if (i > 0) { // previous node in phi direction - col = index - 1; - } - else { // periodicity condition - col = index + ntheta_int - 1; - } - A_Zebra_c[smoother].push_back(col); - } - } - - //! top (r + h+) (only radial smoother) - if (smoother > 1) { - //std::cout << ", top"; - // gyro::trafo(r[j + 1], theta[i], x, y, 0); - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1) { - // means that r[j+1] is not on the upper Dirichlet boundary - val = -0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) - - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)); - - if (val != 0) { - A_Zebra_v[smoother].push_back(val); - A_Zebra_r[smoother].push_back(index); - col = index + n_cols_radial; - A_Zebra_c[smoother].push_back(col); - } - } - } - - //! right (phi+k) (only circle smoother) - if (smoother < 2) { - //std::cout << ", right"; - if (i + 1 < ntheta_int) { // next node in theta direction - thetap1 = theta[i + 1]; - } - else { // periodicity condition - thetap1 = 2 * PI; - } - val = -0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) - - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)); - - if (val != 0) { - A_Zebra_v[smoother].push_back(val); - A_Zebra_r[smoother].push_back(index); - - if (i + 1 < ntheta_int) { // next node in theta direction - col = index + 1; - } - else { // periodicity condition - col = index - ntheta_int + 1; - } - A_Zebra_c[smoother].push_back(col); - } - } - } //treat middle also in the case of a fine black point - - //! middle (r,phi) (both smoothers) - //std::cout << ", middle" << std::endl; - if (i + 1 < ntheta_int) { // Define theta(i+1), this might be on the periodicity condition. - thetap1 = theta[i + 1]; - } - else { - thetap1 = 2 * PI; - } - - col = index; - if (j > 0) { - - val = 0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - } - else { //across the origin; j=0 - - val = 0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) + - 0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) + - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) + - 0.5 * kt / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)) + - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j], theta[i] + PI, 0) + gyro::arr(r[j], theta[i], 0)); - } - - val += betaVec[j * ntheta_int + i]; - - if (val != 0) { - A_Zebra_v[smoother].push_back(val); - A_Zebra_r[smoother].push_back(index); - A_Zebra_c[smoother].push_back(index); - } - } - } - - // % -------------------------------------------------------------------------------------------------- % - - //!treat the outer circle, which is on the Diriclet boundary (radial smoother) - double tmp = 0; - // gyro::trafo(r[nr_int], tmp, x, y, 0); - if (fabs(gyro::distBoundary(r[nr_int], tmp, 0)) < tol_bound_check) { //check if R_max is on boundary - // if (r[nr_int] != Rmax) { - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // } - - for (int i = 0; i < ntheta_int; i++) { // iterate over all points of that circle - //check if the point is black or white - if (i % 2 == 0) { - smoother = 2; - } - else { - smoother = 3; - } - - //check if the node is coarse or fine - extrapol_fine_node = 0; - //only in case of extrapolation and level 0 - if (extrapol == 1 && l == 0) { - if (coarse_nodes_list_theta[i] == -1 || coarse_nodes_list_r[nr_int] == -1) { - extrapol_fine_node = 1; //the node is fine - } - else { - continue; //skip the index if the node is coarse - } - } - /*else { - int row = nr - delete_circles - 1; //last row = r_max-delete circles (-1 because indexing starts at zero) - int col = i / 2; - index = row * n_cols_radial + col; - }*/ - - count_nodes[smoother]++; - int index = count_nodes[smoother] - 1; - - A_Zebra_r[smoother].push_back(index); - A_Zebra_c[smoother].push_back(index); - A_Zebra_v[smoother].push_back(1.0); //just insert "ones" on the diagonal - } - } -} /* ----- end of level::build_Asc0 ----- */ - -/*! \brief Applies the matrix A_sc_ortho for a smoother explicitely on the level l (deprecated) - * - * Asc_ortho corresponds to all lines of a smoother s with colour c and the columns not in Asc - * - * \param smoother_todo: the smoother of this Asc_ortho matrix -*/ -void level::apply_Asc_ortho0(std::vector& Au, int smoother) -{ - //smoother: 0 (circle black), 1 (circle white), 2 (radial black), 3(radial white) - - // if boundary is only defined on radius, checks for wrongly detected boundary - // nodes due to rounding errors (double checking...) - double tol_bound_check = 1e-8; - int extrapol = gyro::icntl[Param::extrapolation]; - - // double x, y; - int col; - double val; - int n_cols_radial = ntheta_int / 2; - - int extrapol_fine_node; //indicates if we have extrapolation on level 0 AND a fine node - // to count the fine nodes, to know the index without the coarse nodes - std::vector count_nodes = {0, 0, 0, 0}; //cb, cw, rb, rw - - //! check if we start at j=0 (across the origin) or j=1 (Diriclet boundary) - // gyro::trafo(r[0], theta[0], x, y, 0); - // alt: r0=0/neumBound - int start_j; - // dirBound([r(1),0])==0 means that (r(1),0) is on Dirichlet boundary - if (fabs(gyro::distBoundary(r[0], theta[0], 0)) < tol_bound_check) { //check if r0 is on boundary - // if (fabs(gyro::distBoundary(x, y, 0)) < tol_bound_check && r[0] != gyro::dcntl[Param::r0_DB]) { - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // } - start_j = 1; - if (extrapol == 1 && l == 0) - count_nodes[0] = n_cols_radial; //in case of the circle/black smoother, we start at the next line - else - count_nodes[0] = ntheta_int; - } - // dirBound([r(1),0])>0 means that (r(1),0) is not on Dirichlet boundary - else { - // if (fabs(gyro::distBoundary(x, y, 0)) > tol_bound_check && r[0] == gyro::dcntl[Param::r0_DB]) { - // throw std::runtime_error("Node on the boundary erroneously detected as node with boundary conditions " - // "(although there are none...)"); - // } - start_j = 0; - } - - // % -------------------------------------------------------------------------------------------------- % - //!Iteration over all points! - for (int j = start_j; j < nr_int; j++) { // start with second circle (j=1), as we already treated the origin(j=0) - for (int i = 0; i < ntheta_int; i++) { - //! if the index and the smoother don't fit together, just skip this point! - if ((j < delete_circles && ((j % 2 == 0 && smoother != 0) || (j % 2 != 0 && smoother != 1))) || - (j >= delete_circles && ((i % 2 == 0 && smoother != 2) || (i % 2 != 0 && smoother != 3)))) { - continue; - } - - //!index of the point in the overall total mxm matrix - //to indicate the col-index of the matrix A_sc_ortho of size (m_sc x m) - int base_row_index = j * ntheta_int + i; - - //!extrapolation: check if we have a fine or a coarse node - extrapol_fine_node = 0; - if (extrapol == 1 && l == 0) { //only do this in case of extrapolation and level 0 - if (coarse_nodes_list_theta[i] == -1 || coarse_nodes_list_r[j] == -1) { - extrapol_fine_node = 1; //the node is fine - } - else { - continue; //skip the index, if the node is coarse - } - } - - //!compute the index of the point in the grid depending on the smoother, and thus the row_index - count_nodes[smoother]++; - int row_index = count_nodes[smoother] - 1; //index of the point (i,j) - - double kt = thetaplus[i]; //k_j - double thetamin1; //the coordinate of theta to the left - double thetap1 = 0; //the coordinate of theta to the right - double ktmin1; //k_j-1 - double hs; //h_i - double hsmin1; //h_i-1 - - if (i > 0) { //normal case - thetamin1 = theta[i - 1]; - ktmin1 = thetaplus[i - 1]; - } - else { //i==0, on the left of the domain, take periodic BCs into acount - thetamin1 = theta[ntheta_int - 1]; // equal to 2*PI-ktmin1 - ktmin1 = thetaplus[ntheta_int - 1]; - } - hs = hplus[j]; - if (j > 0) { - hsmin1 = hplus[j - 1]; - } - else { - hsmin1 = 2 * r[0]; // across the origin - } - - // % -------------------------------------------------------------------------------------------------- % - // 9-Point Stencil (attention order: bottom, bottom left, left, top left, top, top right, right, bottom right, middle) - - //check if we have a black point - // --> fine black point has two coarse neighbours, thus we additionally need to treat the bottom/top or left/right - // - int fine_black_circle = 0; - int fine_black_radial = 0; - if (extrapol_fine_node == 1) { - if (smoother == 0) { - //the point belongs to the black/circle smoother --> additionally treat left/right - fine_black_circle = 1; - } - else if (smoother == 2) { - //the point belongs to the black/radial smoother --> additionally treat bottom/top - fine_black_radial = 1; - } - } - - //! bottom (r - h-) (only circle smoother) - //Extrapolation: also for radial smoother in case of a fine black node - if ((smoother < 2 && j < delete_circles && j > 0) || (smoother > 1 && j == delete_circles) || - fine_black_radial == 1 || (fine_black_circle == 1 && j > 0)) { - //for the circle smoother (but not the inner circle) - //and for the radial smoother for the first line, which has a bottom link to the circle smoother - - // if (j == 1) { - // gyro::trafo(r[j - 1], theta[i], x, y, 0); - // } - // j=1 means r-h is on the boundary - if (j == 1 && fabs(gyro::distBoundary(r[j - 1], theta[i], 0)) < tol_bound_check) { - //empty - //for r1: r0 is on the boundary for Diriclet BC - //we don't treat the bottom point for r1 as it is connected to the boundary (r0) and we thus bring it to the rhs - } - else { - // second circle (at least one 'real' circle with ntheta_int nodes which is closer to the origin) - col = base_row_index - ntheta_int; - val = -0.5 * kt / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)) - - 0.5 * ktmin1 / hsmin1 * (gyro::arr(r[j - 1], theta[i], 0) + gyro::arr(r[j], theta[i], 0)); - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - } - - //! bottom left (r-h-,phi-k) (for both smoothers) - if (j > 0) { //not for j=0 - // if (j == 1) { // coords necessary for potential boundary conditions - // gyro::trafo(r[j - 1], thetamin1, x, y, 0); // r(j) is PREVIOUS r, actual is r(J+1) ! - // } - // j=1 means r-h is on the boundary - if (j == 1 && fabs(gyro::distBoundary(r[j - 1], thetamin1, 0)) < tol_bound_check) { - //empty - //no treatment of bottom point for r1 in the case of Diriclet - } - else { - if (i > 0) { // next node in theta direction but one circle before - col = base_row_index - ntheta_int - 1; - } - else { // periodicity condition - col = base_row_index - 1; - } - val = -(gyro::art(r[j], thetamin1, 0) + gyro::art(r[j - 1], theta[i], 0)); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - } - - //! left (phi-k) (radial smoother only) - //Extrapolation: also for circle smoother in case of a fine node - if ((smoother > 1 && j >= delete_circles) || fine_black_circle == 1) { - if (i > 0) { // previous node in phi direction - col = base_row_index - 1; - } - else { // periodicity condition - col = base_row_index + ntheta_int - 1; - } - val = -0.5 * hsmin1 / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)) - - 0.5 * hs / ktmin1 * (gyro::att(r[j], thetamin1, 0) + gyro::att(r[j], theta[i], 0)); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - - //! top left (r+h+,phi-k) (for both smoothers) - double theta_eval_prelast = 0; - if (i > 0) { // not the first node on the corresponding circle; we can take theta(i-1) - // gyro::trafo(r[j + 1], theta[i - 1], x, y, 0); - } - else { - theta_eval_prelast = theta[ntheta_int - 1]; - // gyro::trafo(r[j + 1], theta_eval_prelast, x, y, 0); - } - - if (j < nr_int - 1) { - if (i > 0) { // previous node in phi direction but at r+h - col = base_row_index + ntheta_int - 1; - } - else { // first node on corresponding circle; pay gyro::attention to periodicity condition! - col = base_row_index + 2 * ntheta_int - 1; - } - val = gyro::art(r[j], thetamin1, 0) + gyro::art(r[j + 1], theta[i], 0); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - - //! top (r + h+) (circle smoother only) - //Extrapolation: also for radial smoother in case of a fine black node - if ((smoother < 2 && j < delete_circles) || fine_black_circle == 1 || fine_black_radial == 1) { - // gyro::trafo(r[j + 1], theta[i], x, y, 0); - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1) { - col = base_row_index + ntheta_int; - val = -0.5 * kt / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)) - - 0.5 * ktmin1 / hs * (gyro::arr(r[j], theta[i], 0) + gyro::arr(r[j + 1], theta[i], 0)); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - } - - //! top right (r+h+,phi+k) (for both smoothers) - if (i + 1 < ntheta_int) { // previous node in phi direction but at r+h - thetap1 = theta[i + 1]; - } - else { // first node on corresponding circle; pay gyro::attention to periodicity condition! - thetap1 = 2 * PI; - } - - // gyro::trafo(r[j + 1], thetap1, x, y, 0); - // means that r[j+1] is not on the Dirichlet boundary - if (j < nr_int - 1) { - if (i + 1 < ntheta_int) { // previous node in phi direction but at r+h - col = base_row_index + ntheta_int + 1; - } - else { // first node on corresponding circle; pay gyro::attention to periodicity condition! - col = base_row_index + 1; - } - val = -gyro::art(r[j + 1], theta[i], 0) - gyro::art(r[j], thetap1, 0); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - - //! right (phi+k) (radial smoother only) - //Extrapolation: also for circle smoother in case of a fine black node - if ((smoother > 1 && j >= delete_circles) || fine_black_circle == 1) { - if (i + 1 < ntheta_int) { // next node in theta direction - col = base_row_index + 1; - thetap1 = theta[i + 1]; - } - else { // periodicity condition - col = base_row_index - ntheta_int + 1; - thetap1 = 2 * PI; - } - val = -0.5 * hs / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)) - - 0.5 * hsmin1 / kt * (gyro::att(r[j], theta[i], 0) + gyro::att(r[j], thetap1, 0)); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - - //! bottom right (r-h-,phi+k) (for both smoothers) - if (j > 0) { //not for j=0 - double r_tmp, theta_tmp; - if (j == 1) { // coords necessary for potential boundary conditions - if (i + 1 < ntheta_int) { - // gyro::trafo(r[j - 1], theta[i + 1], x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = theta[i + 1]; - } - else { - double pi2 = 2 * PI; - // gyro::trafo(r[j - 1], pi2, x, y, 0); - r_tmp = r[j - 1]; - theta_tmp = pi2; - } - } - if (i + 1 < ntheta_int) { - thetap1 = theta[i + 1]; - } - else { - thetap1 = 2 * PI; - } - - if (j == 1 && fabs(gyro::distBoundary(r_tmp, theta_tmp, 0)) < tol_bound_check) { - //empty - //no treatment of bottom point for r1 in the case of Diriclet - } - else { - if (i + 1 < ntheta_int) { // next node in theta direction but one circle before - col = base_row_index - ntheta_int + 1; - } - else { // periodicity condition - col = base_row_index - 2 * ntheta_int + 1; - } - val = gyro::art(r[j - 1], theta[i], 0) + gyro::art(r[j], thetap1, 0); - - if (val != 0) { - if (gyro::icntl[Param::smoother] == 13) { - if (smoother < 2) { //circle - - Au[row_index] += val * u_previous_c[col]; - } - else { //radial - - Au[row_index] += val * u_previous_r[col]; - } - } - else { - - Au[row_index] += val * u[col]; - } - } - } - } - } - } -} /* ----- end of level::apply_Asc_ortho0 ----- */ diff --git a/src/test_cases/CartesianR2GyroSonnendruckerCircular.cpp b/src/test_cases/CartesianR2GyroSonnendruckerCircular.cpp deleted file mode 100644 index 7ce4cb41..00000000 --- a/src/test_cases/CartesianR2GyroSonnendruckerCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroSonnendruckerCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - ((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) - 5.03290747193186 * (r[i]/Rmax) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i])) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroSonnendruckerShafranov.cpp b/src/test_cases/CartesianR2GyroSonnendruckerShafranov.cpp deleted file mode 100644 index b940c3c7..00000000 --- a/src/test_cases/CartesianR2GyroSonnendruckerShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroSonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroSonnendruckerTriangular.cpp b/src/test_cases/CartesianR2GyroSonnendruckerTriangular.cpp deleted file mode 100644 index 3e744518..00000000 --- a/src/test_cases/CartesianR2GyroSonnendruckerTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroSonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - ((-(r[i]/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroSonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2GyroSonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniCircular.cpp b/src/test_cases/CartesianR2GyroZoniCircular.cpp deleted file mode 100644 index 2c7582f6..00000000 --- a/src/test_cases/CartesianR2GyroZoniCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - ((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - ((r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - ((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniShafranov.cpp b/src/test_cases/CartesianR2GyroZoniShafranov.cpp deleted file mode 100644 index b0584f4c..00000000 --- a/src/test_cases/CartesianR2GyroZoniShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) - (2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniShiftedCircular.cpp b/src/test_cases/CartesianR2GyroZoniShiftedCircular.cpp deleted file mode 100644 index 92a37a45..00000000 --- a/src/test_cases/CartesianR2GyroZoniShiftedCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - ((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - ((r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - ((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniShiftedShafranov.cpp b/src/test_cases/CartesianR2GyroZoniShiftedShafranov.cpp deleted file mode 100644 index 8d992420..00000000 --- a/src/test_cases/CartesianR2GyroZoniShiftedShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) - (2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniShiftedTriangular.cpp b/src/test_cases/CartesianR2GyroZoniShiftedTriangular.cpp deleted file mode 100644 index b37c88e1..00000000 --- a/src/test_cases/CartesianR2GyroZoniShiftedTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2GyroZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2GyroZoniTriangular.cpp b/src/test_cases/CartesianR2GyroZoniTriangular.cpp deleted file mode 100644 index 82d636d9..00000000 --- a/src/test_cases/CartesianR2GyroZoniTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2GyroZoniTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2GyroZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2GyroZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2GyroZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2PoissonCircular.cpp b/src/test_cases/CartesianR2PoissonCircular.cpp deleted file mode 100644 index ecd7a2fb..00000000 --- a/src/test_cases/CartesianR2PoissonCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -#include "CartesianR2PoissonCircular.h" -#include -#include -#include - - -/*........................................*/ -double CartesianR2PoissonCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2PoissonCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2PoissonCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-INT64_C(1)))); - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2PoissonCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2PoissonCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2PoissonCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 8.0 * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 4.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2PoissonCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 8.0 * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 4.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 8.0 * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 4.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2PoissonCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2PoissonCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR2PoissonCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2PoissonCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2PoissonCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2PoissonShafranov.cpp b/src/test_cases/CartesianR2PoissonShafranov.cpp deleted file mode 100644 index 80c9fa0a..00000000 --- a/src/test_cases/CartesianR2PoissonShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2PoissonShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2PoissonShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2PoissonShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2PoissonShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2PoissonShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR2PoissonShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2PoissonShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2PoissonShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2PoissonTriangular.cpp b/src/test_cases/CartesianR2PoissonTriangular.cpp deleted file mode 100644 index 5adfba5c..00000000 --- a/src/test_cases/CartesianR2PoissonTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2PoissonTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2PoissonTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2PoissonTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2PoissonTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-1.0) * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2PoissonTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.0) * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (r[i]/Rmax) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.0) * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 1.0 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 1.0 * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR2PoissonTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2PoissonTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2PoissonTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2PoissonTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2PoissonTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2SonnendruckerCircular.cpp b/src/test_cases/CartesianR2SonnendruckerCircular.cpp deleted file mode 100644 index 050e2693..00000000 --- a/src/test_cases/CartesianR2SonnendruckerCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2SonnendruckerCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2SonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) - 5.03290747193186 * (r[i]/Rmax) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2SonnendruckerShafranov.cpp b/src/test_cases/CartesianR2SonnendruckerShafranov.cpp deleted file mode 100644 index b48e116e..00000000 --- a/src/test_cases/CartesianR2SonnendruckerShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2SonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2SonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2SonnendruckerTriangular.cpp b/src/test_cases/CartesianR2SonnendruckerTriangular.cpp deleted file mode 100644 index 718408b0..00000000 --- a/src/test_cases/CartesianR2SonnendruckerTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2SonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2SonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2SonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2SonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniCircular.cpp b/src/test_cases/CartesianR2ZoniCircular.cpp deleted file mode 100644 index f2b5a140..00000000 --- a/src/test_cases/CartesianR2ZoniCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2ZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2ZoniCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniShafranov.cpp b/src/test_cases/CartesianR2ZoniShafranov.cpp deleted file mode 100644 index 83318b58..00000000 --- a/src/test_cases/CartesianR2ZoniShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2ZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2ZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2ZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2ZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniShiftedCircular.cpp b/src/test_cases/CartesianR2ZoniShiftedCircular.cpp deleted file mode 100644 index 7c7c31d9..00000000 --- a/src/test_cases/CartesianR2ZoniShiftedCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * ((-8.0) * M_PI * (r[i]/Rmax) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 8.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 8.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-8.0) * M_PI * (r/Rmax) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 8.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 8.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniShiftedShafranov.cpp b/src/test_cases/CartesianR2ZoniShiftedShafranov.cpp deleted file mode 100644 index 6af2ef5d..00000000 --- a/src/test_cases/CartesianR2ZoniShiftedShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.0 * M_PI * (r[i]/Rmax) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - M_PI * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * (r[i]/Rmax) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * map1_kappa + 2.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (4.0 * M_PI * map1_delta * (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * (r/Rmax) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.0 * M_PI * (r/Rmax) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-4.0) * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.0 * M_PI * ((r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow((map1_kappa + 1.0), 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - M_PI * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa - 2.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * (r/Rmax) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * map1_kappa + 2.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniShiftedTriangular.cpp b/src/test_cases/CartesianR2ZoniShiftedTriangular.cpp deleted file mode 100644 index 21f2d195..00000000 --- a/src/test_cases/CartesianR2ZoniShiftedTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2ZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR2ZoniTriangular.cpp b/src/test_cases/CartesianR2ZoniTriangular.cpp deleted file mode 100644 index 710e5d6b..00000000 --- a/src/test_cases/CartesianR2ZoniTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR2ZoniTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR2ZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR2ZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR2ZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR2ZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * (r[i]/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * (r[i]/Rmax) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 4.0 * (r[i]/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 8.0 * M_PI * (r[i]/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 2.0 * ((r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 4.0 * M_PI * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + ((1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 4.0 * M_PI * (r[i]/Rmax) * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-2.0) * (r[i]/Rmax) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * M_PI * (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * (r/Rmax) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * (r/Rmax) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 4.0 * (r/Rmax) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 8.0 * M_PI * (r/Rmax) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (1.0 - (r/Rmax) * (r/Rmax)) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.0 * (M_PI * M_PI) * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 2.0 * ((r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 4.0 * M_PI * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + ((1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * M_PI * map2_epsilon * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 4.0 * (M_PI * M_PI) * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 4.0 * M_PI * (r/Rmax) * (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + (1.0 - (r/Rmax) * (r/Rmax)) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-2.0) * (r/Rmax) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + (1.0 - (r/Rmax) * (r/Rmax)) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * M_PI * (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR2ZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR2ZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR2ZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR2ZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r[i]/Rmax) * (r[i]/Rmax)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR2ZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - (r/Rmax) * (r/Rmax)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroSonnendruckerCircular.cpp b/src/test_cases/CartesianR6GyroSonnendruckerCircular.cpp deleted file mode 100644 index 8d9eb3c7..00000000 --- a/src/test_cases/CartesianR6GyroSonnendruckerCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroSonnendruckerCircular.h" -#include -#include - -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) - 5.03290747193186 * (r/Rmax) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - ((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) - 5.03290747193186 * (r[i]/Rmax) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) - 5.03290747193186 * (r/Rmax) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i])) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroSonnendruckerShafranov.cpp b/src/test_cases/CartesianR6GyroSonnendruckerShafranov.cpp deleted file mode 100644 index 99b56e8b..00000000 --- a/src/test_cases/CartesianR6GyroSonnendruckerShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroSonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - (2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroSonnendruckerTriangular.cpp b/src/test_cases/CartesianR6GyroSonnendruckerTriangular.cpp deleted file mode 100644 index e58741fc..00000000 --- a/src/test_cases/CartesianR6GyroSonnendruckerTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroSonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - ((-(r[i]/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - ((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroSonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6GyroSonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniCircular.cpp b/src/test_cases/CartesianR6GyroZoniCircular.cpp deleted file mode 100644 index 22a3610a..00000000 --- a/src/test_cases/CartesianR6GyroZoniCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - ((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - ((r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - ((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniShafranov.cpp b/src/test_cases/CartesianR6GyroZoniShafranov.cpp deleted file mode 100644 index 4fc457ef..00000000 --- a/src/test_cases/CartesianR6GyroZoniShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) - (2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniShiftedCircular.cpp b/src/test_cases/CartesianR6GyroZoniShiftedCircular.cpp deleted file mode 100644 index dd8f07e8..00000000 --- a/src/test_cases/CartesianR6GyroZoniShiftedCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - ((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - ((r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - ((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniShiftedShafranov.cpp b/src/test_cases/CartesianR6GyroZoniShiftedShafranov.cpp deleted file mode 100644 index 9e9c4700..00000000 --- a/src/test_cases/CartesianR6GyroZoniShiftedShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))) - (2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])) - (2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniShiftedTriangular.cpp b/src/test_cases/CartesianR6GyroZoniShiftedTriangular.cpp deleted file mode 100644 index e13c99cc..00000000 --- a/src/test_cases/CartesianR6GyroZoniShiftedTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6GyroZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6GyroZoniTriangular.cpp b/src/test_cases/CartesianR6GyroZoniTriangular.cpp deleted file mode 100644 index 760e29f6..00000000 --- a/src/test_cases/CartesianR6GyroZoniTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6GyroZoniTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6GyroZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - ((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - ((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6GyroZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6GyroZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6PoissonCircular.cpp b/src/test_cases/CartesianR6PoissonCircular.cpp deleted file mode 100644 index 1b21e785..00000000 --- a/src/test_cases/CartesianR6PoissonCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -#include "CartesianR6PoissonCircular.h" -#include -#include -#include - - -/*........................................*/ -double CartesianR6PoissonCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6PoissonCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6PoissonCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-INT64_C(1)))); - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6PoissonCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6PoissonCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6PoissonCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 1.0 * (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6PoissonCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 1.0 * (r[i]/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 1.0 * (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6PoissonCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6PoissonCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR6PoissonCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6PoissonCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6PoissonCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6PoissonShafranov.cpp b/src/test_cases/CartesianR6PoissonShafranov.cpp deleted file mode 100644 index ce8b8ac9..00000000 --- a/src/test_cases/CartesianR6PoissonShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR6PoissonShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6PoissonShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6PoissonShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6PoissonShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6PoissonShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 1.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR6PoissonShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6PoissonShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6PoissonShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6PoissonTriangular.cpp b/src/test_cases/CartesianR6PoissonTriangular.cpp deleted file mode 100644 index 76064240..00000000 --- a/src/test_cases/CartesianR6PoissonTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "CartesianR6PoissonTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6PoissonTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6PoissonTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6PoissonTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-1.0) * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6PoissonTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.0) * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (r[i]/Rmax) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-1.0) * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 1.0 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 1.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void CartesianR6PoissonTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6PoissonTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6PoissonTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6PoissonTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6PoissonTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6SonnendruckerCircular.cpp b/src/test_cases/CartesianR6SonnendruckerCircular.cpp deleted file mode 100644 index 290a990c..00000000 --- a/src/test_cases/CartesianR6SonnendruckerCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6SonnendruckerCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR6SonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) - 5.03290747193186 * (r/Rmax) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) - 5.03290747193186 * (r[i]/Rmax) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) - 5.03290747193186 * (r/Rmax) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6SonnendruckerShafranov.cpp b/src/test_cases/CartesianR6SonnendruckerShafranov.cpp deleted file mode 100644 index 63749cff..00000000 --- a/src/test_cases/CartesianR6SonnendruckerShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6SonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6SonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6SonnendruckerTriangular.cpp b/src/test_cases/CartesianR6SonnendruckerTriangular.cpp deleted file mode 100644 index 9312a869..00000000 --- a/src/test_cases/CartesianR6SonnendruckerTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6SonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6SonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 5.03290747193186 * (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6SonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6SonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniCircular.cpp b/src/test_cases/CartesianR6ZoniCircular.cpp deleted file mode 100644 index f7721f45..00000000 --- a/src/test_cases/CartesianR6ZoniCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6ZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6ZoniCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniShafranov.cpp b/src/test_cases/CartesianR6ZoniShafranov.cpp deleted file mode 100644 index 03fbb0c2..00000000 --- a/src/test_cases/CartesianR6ZoniShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6ZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6ZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6ZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6ZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniShiftedCircular.cpp b/src/test_cases/CartesianR6ZoniShiftedCircular.cpp deleted file mode 100644 index 0ce60df7..00000000 --- a/src/test_cases/CartesianR6ZoniShiftedCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)))) / (r/Rmax); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 3.2768 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 3.2768 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * sin(2.0 * M_PI * (r[i]/Rmax) * cos(theta)) * cos(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)))) / (r[i]/Rmax); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((-1.6384) * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 3.2768 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 3.2768 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * sin(2.0 * M_PI * (r/Rmax) * cos_theta[i]) * cos_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)))) / (r/Rmax); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r/Rmax) * cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r[i]/Rmax) * sin(theta)) * cos(2.0 * M_PI * (r[i]/Rmax) * cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (r/Rmax) * sin_theta[i]) * cos(2.0 * M_PI * (r/Rmax) * cos_theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniShiftedShafranov.cpp b/src/test_cases/CartesianR6ZoniShiftedShafranov.cpp deleted file mode 100644 index c225079d..00000000 --- a/src/test_cases/CartesianR6ZoniShiftedShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r[i]/Rmax) + M_PI * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (r[i]/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * pow(cos(theta), 2.0) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.8192 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-1.6384) * (M_PI * M_PI) * (r[i]/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(theta) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * (M_PI * M_PI) * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(theta) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * cos(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * cos(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) - 0.4096 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)) * sin(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta))) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (r[i]/Rmax) * (2.0 * map1_kappa + 2.0) * sin(theta)) * cos(M_PI * (r[i]/Rmax) * ((-2.0) * map1_delta * (r[i]/Rmax) - 2.0 * map1_kappa * cos(theta) + 2.0 * cos(theta)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(2.0 * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (1.6384 * M_PI * map1_delta * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 1.6384 * (M_PI * M_PI) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 4.9152 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map1_delta * (r/Rmax) + M_PI * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (r/Rmax) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * pow(cos_theta[i], 2.0) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * pow((2.0 * map1_kappa - 2.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.8192 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] - 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-0.4096) * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-1.6384) * (M_PI * M_PI) * (r/Rmax) * pow((map1_kappa + 1.0), 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin_theta[i] * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * (M_PI * M_PI) * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos_theta[i] * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * (2.0 * map1_kappa - 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * cos_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * (0.4096 * M_PI * (2.0 * map1_kappa + 2.0) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * cos(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) - 0.4096 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-4.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]) * sin(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i])) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (r/Rmax) * (2.0 * map1_kappa + 2.0) * sin_theta[i]) * cos(M_PI * (r/Rmax) * ((-2.0) * map1_delta * (r/Rmax) - 2.0 * map1_kappa * cos_theta[i] + 2.0 * cos_theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin(theta) + 2.0 * (r/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * (r/Rmax) * cos(theta))); -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r[i]/Rmax) * sin(theta) + 2.0 * (r[i]/Rmax) * sin(theta))) * cos(M_PI * ((-2.0) * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) - 2.0 * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * (r[i]/Rmax) * cos(theta))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(M_PI * (2.0 * map1_kappa * (r/Rmax) * sin_theta[i] + 2.0 * (r/Rmax) * sin_theta[i])) * cos(M_PI * ((-2.0) * map1_delta * ((r/Rmax) * (r/Rmax)) - 2.0 * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * (r/Rmax) * cos_theta[i])); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniShiftedTriangular.cpp b/src/test_cases/CartesianR6ZoniShiftedTriangular.cpp deleted file mode 100644 index 7a8098e5..00000000 --- a/src/test_cases/CartesianR6ZoniShiftedTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6ZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/CartesianR6ZoniTriangular.cpp b/src/test_cases/CartesianR6ZoniTriangular.cpp deleted file mode 100644 index 42aaa013..00000000 --- a/src/test_cases/CartesianR6ZoniTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// CartesianR6 simulates solution (23) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "CartesianR6ZoniTriangular.h" -#include -#include - - -/*........................................*/ -double CartesianR6ZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void CartesianR6ZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void CartesianR6ZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void CartesianR6ZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r[i]/Rmax)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (r[i]/Rmax) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (r[i]/Rmax) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * pow(cos(theta), 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 1.6384 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 12.288 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 9.8304 * M_PI * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 29.4912 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 12.288 * pow(((r[i]/Rmax) - 1.0), 4.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(theta) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 0.8192 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 4.9152 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0)) - 0.4096 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * pow(sin(theta), 2.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 1.6384 * M_PI * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(theta) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * M_PI * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 0.8192 * M_PI * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 5.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-((-(r/Rmax)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (r/Rmax) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (r/Rmax) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow((2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * M_PI * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.6384 * (M_PI * M_PI) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * pow(cos_theta[i], 2.0) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 1.6384 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 4.9152 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 12.288 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 4.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 4.9152 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 9.8304 * M_PI * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 29.4912 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 12.288 * pow(((r/Rmax) - 1.0), 4.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.8192 * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos_theta[i] * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 0.8192 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 4.9152 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-0.8192) * M_PI * map2_epsilon * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0)) - 0.4096 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) - 1.6384 * (M_PI * M_PI) * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * pow(sin_theta[i], 2.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 1.6384 * M_PI * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin_theta[i] * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * ((-2.0) * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * M_PI * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * (2.0 * M_PI * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * M_PI * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * cos(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 0.8192 * M_PI * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 5.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon) + 2.4576 * pow(((r/Rmax) - 1.0), 5.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void CartesianR6ZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void CartesianR6ZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double CartesianR6ZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); -} -/*........................................*/ -void CartesianR6ZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r[i]/Rmax) - 1.0), 6.0) * pow(((r[i]/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ -void CartesianR6ZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow(((r/Rmax) - 1.0), 6.0) * pow(((r/Rmax) + 1.0), 6.0) * sin(2.0 * M_PI * map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * cos(2.0 * M_PI * (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroSonnendruckerCircular.cpp b/src/test_cases/PolarR6GyroSonnendruckerCircular.cpp deleted file mode 100644 index 04b296e2..00000000 --- a/src/test_cases/PolarR6GyroSonnendruckerCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroSonnendruckerCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - pow((r[i]/Rmax), 4.0) * ((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta))); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroSonnendruckerShafranov.cpp b/src/test_cases/PolarR6GyroSonnendruckerShafranov.cpp deleted file mode 100644 index 45337b32..00000000 --- a/src/test_cases/PolarR6GyroSonnendruckerShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroSonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - pow((r[i]/Rmax), 4.0) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroSonnendruckerTriangular.cpp b/src/test_cases/PolarR6GyroSonnendruckerTriangular.cpp deleted file mode 100644 index a2b5fd84..00000000 --- a/src/test_cases/PolarR6GyroSonnendruckerTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroSonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) - pow((r[i]/Rmax), 4.0) * (4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]) / (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = pow((0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)), (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroSonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroSonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniCircular.cpp b/src/test_cases/PolarR6GyroZoniCircular.cpp deleted file mode 100644 index 95086adc..00000000 --- a/src/test_cases/PolarR6GyroZoniCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0))); -} -/*........................................*/ -void PolarR6GyroZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * ((r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniShafranov.cpp b/src/test_cases/PolarR6GyroZoniShafranov.cpp deleted file mode 100644 index e5fe6c0c..00000000 --- a/src/test_cases/PolarR6GyroZoniShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniShiftedCircular.cpp b/src/test_cases/PolarR6GyroZoniShiftedCircular.cpp deleted file mode 100644 index fc0e8a60..00000000 --- a/src/test_cases/PolarR6GyroZoniShiftedCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0))); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * ((r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniShiftedCulham.cpp b/src/test_cases/PolarR6GyroZoniShiftedCulham.cpp deleted file mode 100644 index f3743745..00000000 --- a/src/test_cases/PolarR6GyroZoniShiftedCulham.cpp +++ /dev/null @@ -1,662 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniShiftedCulham.h" -#include -#include -#include -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::my_sum(std::array& f, int64_t start_idx, int64_t end_idx) const -{ - int64_t i; - double result; - result = 0.0; - #pragma omp parallel for reduction(+: result) - for (i = start_idx; i < end_idx; i += 1) - { - result += f[i]; - } - return result; -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::q(double rr) const -{ - return 0.8 - 0.1 * (rr * rr); -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::dq(double rr) const -{ - return (-0.2) * rr; -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::p(double rr) const -{ - return 100000.0 - 90000.0 * (rr * rr); -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::dp(double rr) const -{ - return (-180000.0) * rr; -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::dg(double rr, double g) const -{ - return ((-g) * (0.0625000000000001 * (rr * rr) / pow((1.0 - 0.125 * (rr * rr)), 2.0) + 2.0 / (4.0 - 0.5 * (rr * rr))) + 2.261946711816e-06 * (4.0 - 0.5 * (rr * rr)) / g) / (rr / (4.0 - 0.5 * (rr * rr)) + (4.0 - 0.5 * (rr * rr)) / (g * rr)); -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::double_deriv(double rr, double c, double g, double dg, double val, double d_val) const -{ - return c * val / (rr * rr) - d_val * (pow(rr, (double)((-1))) + (4.0 - 0.5 * (rr * rr)) * (2.0 * dg * rr / (4.0 - 0.5 * (rr * rr)) + 0.125 * g * (rr * rr) / pow((1.0 - 0.125 * (rr * rr)), 2.0) + 2.0 * g / (4.0 - 0.5 * (rr * rr))) / (g * rr)); -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::g(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return g_array[ri]; - } - else - { - m = (g_array[ri + 1] - g_array[ri]) / dr; - c = g_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::Delta(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return Delta_array[ri]; - } - else - { - m = (Delta_array[ri + 1] - Delta_array[ri]) / dr; - c = Delta_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::Delta_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return Delta_prime_array[ri]; - } - else - { - m = (Delta_prime_array[ri + 1] - Delta_prime_array[ri]) / dr; - c = Delta_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::E(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return E_array[ri]; - } - else - { - m = (E_array[ri + 1] - E_array[ri]) / dr; - c = E_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::T(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return T_array[ri]; - } - else - { - m = (T_array[ri + 1] - T_array[ri]) / dr; - c = T_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::E_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return E_prime_array[ri]; - } - else - { - m = (E_prime_array[ri + 1] - E_prime_array[ri]) / dr; - c = E_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::T_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return T_prime_array[ri]; - } - else - { - m = (T_prime_array[ri + 1] - T_prime_array[ri]) / dr; - c = T_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::P(double rr) const -{ - if (rr == 0) - { - return 0.0; - } - else - { - return 0.005 * pow(rr, 3.0) + 0.1 * rr * Delta(rr) - 0.1 * pow(E(rr), 2.0) - pow(T(rr), 2.0) / rr; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::dP(double rr) const -{ - if (rr == 0) - { - return 0.0; - } - else - { - return 0.015 * (rr * rr) + 0.1 * rr * Delta_prime(rr) + 0.1 * Delta(rr) - 0.2 * E(rr) * E_prime(rr) - 2.0 * T(rr) * T_prime(rr) / rr + pow(T(rr), 2.0) / (rr * rr); - } -} -/*........................................*/ -PolarR6GyroZoniShiftedCulham::PolarR6GyroZoniShiftedCulham() -{ - double rr; - double dr; - double dr_h; - std::array r; - int64_t i; - double dg_1; - double dE_1; - double dT_1; - double ddE_1; - double ddT_1; - double r2; - double g_2; - double dg_2; - double E_2; - double T_2; - double dE_2; - double dT_2; - double ddE_2; - double ddT_2; - double g_3; - double dg_3; - double E_3; - double T_3; - double dE_3; - double dT_3; - double ddE_3; - double ddT_3; - double g_4; - double dg_4; - double E_4; - double T_4; - double dE_4; - double dT_4; - double ddE_4; - double ddT_4; - double current_Ea; - double current_Ta; - std::array f; - std::array integ_contents; - double integral; - double current_Delta_a; - size_t i_0001; - rr = 0.0; - dr = 1.0 / 1000; - dr_h = dr * 0.5; - g_array[0] = 1.0; - E_array[0] = 0.0; - E_prime_array[0] = 1.0; - T_array[0] = 0.0; - T_prime_array[0] = 0.0; - r[0] = rr; - rr += dr; - r[1] = rr; - g_array[1] = 1.0; - E_array[1] = rr; - E_prime_array[1] = 1.0; - T_array[1] = rr * rr; - T_prime_array[1] = 2 * rr; - for (i = 1; i < 1000; i += 1) - { - /*Step 1*/ - dg_1 = dg(rr, g_array[i]); - dE_1 = E_prime_array[i]; - dT_1 = T_prime_array[i]; - ddE_1 = double_deriv(rr, 3.0, g_array[i], dg_1, E_array[i], E_prime_array[i]); - ddT_1 = double_deriv(rr, 8.0, g_array[i], dg_1, T_array[i], T_prime_array[i]); - /*Step 2*/ - r2 = rr + dr_h; - g_2 = g_array[i] + dr_h * dg_1; - dg_2 = dg(r2, g_2); - E_2 = E_array[i] + dE_1 * dr_h; - T_2 = T_array[i] + dT_1 * dr_h; - dE_2 = E_prime_array[i] + ddE_1 * dr_h; - dT_2 = T_prime_array[i] + ddT_1 * dr_h; - ddE_2 = double_deriv(r2, 3.0, g_2, dg_2, E_2, dE_2); - ddT_2 = double_deriv(r2, 8.0, g_2, dg_2, T_2, dT_2); - /*Step 3*/ - g_3 = g_array[i] + dr_h * dg_2; - dg_3 = dg(r2, g_3); - E_3 = E_array[i] + dE_2 * dr_h; - T_3 = T_array[i] + dT_2 * dr_h; - dE_3 = E_prime_array[i] + ddE_2 * dr_h; - dT_3 = T_prime_array[i] + ddT_2 * dr_h; - ddE_3 = double_deriv(r2, 3.0, g_3, dg_3, E_3, dE_3); - ddT_3 = double_deriv(r2, 8.0, g_3, dg_3, T_3, dT_3); - /*Step 4*/ - rr = rr + dr; - g_4 = g_array[i] + dr * dg_3; - dg_4 = dg(rr, g_4); - E_4 = E_array[i] + dE_3 * dr; - T_4 = T_array[i] + dT_3 * dr; - dE_4 = E_prime_array[i] + ddE_3 * dr; - dT_4 = T_prime_array[i] + ddT_3 * dr; - ddE_4 = double_deriv(rr, 3.0, g_4, dg_4, E_4, dE_4); - ddT_4 = double_deriv(rr, 8.0, g_4, dg_4, T_4, dT_4); - g_array[i + 1] = g_array[i] + dr * (dg_1 + 2 * dg_2 + 2 * dg_3 + dg_4) / 6.0; - E_array[i + 1] = E_array[i] + dr * (dE_1 + 2 * dE_2 + 2 * dE_3 + dE_4) / 6.0; - T_array[i + 1] = T_array[i] + dr * (dT_1 + 2 * dT_2 + 2 * dT_3 + dT_4) / 6.0; - E_prime_array[i + 1] = E_prime_array[i] + dr * (ddE_1 + 2 * ddE_2 + 2 * ddE_3 + ddE_4) / 6.0; - T_prime_array[i + 1] = T_prime_array[i] + dr * (ddT_1 + 2 * ddT_2 + 2 * ddT_3 + ddT_4) / 6.0; - r[i + 1] = rr; - } - current_Ea = E(1.0); - current_Ta = T(1.0); - for (i_0001 = 0; i_0001 < E_array.size(); i_0001 += 1) - { - E_array[i_0001] = 0.25 * E_array[i_0001] / current_Ea; - } - for (i_0001 = 0; i_0001 < T_array.size(); i_0001 += 1) - { - T_array[i_0001] = 0.1 * T_array[i_0001] / current_Ta; - } - for (i_0001 = 0; i_0001 < E_prime_array.size(); i_0001 += 1) - { - E_prime_array[i_0001] = 0.25 * E_prime_array[i_0001] / current_Ea; - } - for (i_0001 = 0; i_0001 < T_prime_array.size(); i_0001 += 1) - { - T_prime_array[i_0001] = 0.1 * T_prime_array[i_0001] / current_Ta; - } - for (i_0001 = 0; i_0001 < f.size(); i_0001 += 1) - { - f[i_0001] = r[i_0001] * g_array[i_0001] / 5.0 / q(r[i_0001]); - } - for (i_0001 = 0; i_0001 < integ_contents.size(); i_0001 += 1) - { - integ_contents[i_0001] = r[i_0001] * (f[i_0001] * f[i_0001]) - 2 * (r[i_0001] * r[i_0001]) * 1.25663706212e-06 * dp(r[i_0001]) / (1.0 * 1.0); - } - Delta_prime_array[0] = 0; - Delta_array[0] = 0; - integral = 0.0; - for (i = 1; i < 1000 + 1; i += 1) - { - integral += dr * (integ_contents[i - 1] + integ_contents[i]) * 0.5; - Delta_prime_array[i] = (-integral) / (5.0 * r[i] * pow(f[i], 2.0)); - Delta_array[i] = Delta_array[i - 1] + dr * 0.5 * (Delta_prime_array[i - 1] + Delta_prime_array[i]); - } - current_Delta_a = Delta(1.0); - for (i_0001 = 0; i_0001 < Delta_array.size(); i_0001 += 1) - { - Delta_array[i_0001] -= current_Delta_a; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::x(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta) + Delta((r/Rmax)) - E((r/Rmax)) * cos(theta) - P((r/Rmax)) * cos(theta) + T((r/Rmax)) * cos(2.0 * theta) + 5.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::x(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta) + Delta((r[i]/Rmax)) - E((r[i]/Rmax)) * cos(theta) - P((r[i]/Rmax)) * cos(theta) + T((r[i]/Rmax)) * cos(2.0 * theta) + 5.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::x(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i] + Delta((r/Rmax)) - E((r/Rmax)) * cos_theta[i] - P((r/Rmax)) * cos_theta[i] + T((r/Rmax)) * cos(2.0 * theta[i]) + 5.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::y(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta) - E((r/Rmax)) * sin(theta) - P((r/Rmax)) * sin(theta) - T((r/Rmax)) * sin(2.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::y(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) - E((r[i]/Rmax)) * sin(theta) - P((r[i]/Rmax)) * sin(theta) - T((r[i]/Rmax)) * sin(2.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::y(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] - E((r/Rmax)) * sin_theta[i] - P((r/Rmax)) * sin_theta[i] - T((r/Rmax)) * sin(2.0 * theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_rr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (Delta_prime((r/Rmax)) - E_prime((r/Rmax)) * cos(theta) + T_prime((r/Rmax)) * cos(2.0 * theta) - dP((r/Rmax)) * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_rr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (Delta_prime((r[i]/Rmax)) - E_prime((r[i]/Rmax)) * cos(theta) + T_prime((r[i]/Rmax)) * cos(2.0 * theta) - dP((r[i]/Rmax)) * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_rr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (Delta_prime((r/Rmax)) - E_prime((r/Rmax)) * cos_theta[i] + T_prime((r/Rmax)) * cos(2.0 * theta[i]) - dP((r/Rmax)) * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_rt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta) + E((r/Rmax)) * sin(theta) + P((r/Rmax)) * sin(theta) - 2.0 * T((r/Rmax)) * sin(2.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_rt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta) + E((r[i]/Rmax)) * sin(theta) + P((r[i]/Rmax)) * sin(theta) - 2.0 * T((r[i]/Rmax)) * sin(2.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_rt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i] + E((r/Rmax)) * sin_theta[i] + P((r/Rmax)) * sin_theta[i] - 2.0 * T((r/Rmax)) * sin(2.0 * theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_tr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-E_prime((r/Rmax))) * sin(theta) - T_prime((r/Rmax)) * sin(2.0 * theta) - dP((r/Rmax)) * sin(theta) + sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_tr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r[i]/Rmax))) * sin(theta) - T_prime((r[i]/Rmax)) * sin(2.0 * theta) - dP((r[i]/Rmax)) * sin(theta) + sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_tr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r/Rmax))) * sin_theta[i] - T_prime((r/Rmax)) * sin(2.0 * theta[i]) - dP((r/Rmax)) * sin_theta[i] + sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_tt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta) - E((r/Rmax)) * cos(theta) - P((r/Rmax)) * cos(theta) - 2.0 * T((r/Rmax)) * cos(2.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_tt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta) - E((r[i]/Rmax)) * cos(theta) - P((r[i]/Rmax)) * cos(theta) - 2.0 * T((r[i]/Rmax)) * cos(2.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_tt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i] - E((r/Rmax)) * cos_theta[i] - P((r/Rmax)) * cos_theta[i] - 2.0 * T((r/Rmax)) * cos(2.0 * theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_xr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-(r/Rmax)) * cos(theta) + E((r/Rmax)) * cos(theta) + P((r/Rmax)) * cos(theta) + 2.0 * T((r/Rmax)) * cos(2.0 * theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_xr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r[i]/Rmax)) * cos(theta) + E((r[i]/Rmax)) * cos(theta) + P((r[i]/Rmax)) * cos(theta) + 2.0 * T((r[i]/Rmax)) * cos(2.0 * theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_xr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r/Rmax)) * cos_theta[i] + E((r/Rmax)) * cos_theta[i] + P((r/Rmax)) * cos_theta[i] + 2.0 * T((r/Rmax)) * cos(2.0 * theta[i])) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_xq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-(r/Rmax)) * sin(theta) + E((r/Rmax)) * sin(theta) + P((r/Rmax)) * sin(theta) - 2.0 * T((r/Rmax)) * sin(2.0 * theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_xq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r[i]/Rmax)) * sin(theta) + E((r[i]/Rmax)) * sin(theta) + P((r[i]/Rmax)) * sin(theta) - 2.0 * T((r[i]/Rmax)) * sin(2.0 * theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_xq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r/Rmax)) * sin_theta[i] + E((r/Rmax)) * sin_theta[i] + P((r/Rmax)) * sin_theta[i] - 2.0 * T((r/Rmax)) * sin(2.0 * theta[i])) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_yr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-E_prime((r/Rmax))) * sin(theta) - T_prime((r/Rmax)) * sin(2.0 * theta) - dP((r/Rmax)) * sin(theta) + sin(theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_yr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r[i]/Rmax))) * sin(theta) - T_prime((r[i]/Rmax)) * sin(2.0 * theta) - dP((r[i]/Rmax)) * sin(theta) + sin(theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_yr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r/Rmax))) * sin_theta[i] - T_prime((r/Rmax)) * sin(2.0 * theta[i]) - dP((r/Rmax)) * sin_theta[i] + sin_theta[i]) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::J_yq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-Delta_prime((r/Rmax))) + E_prime((r/Rmax)) * cos(theta) - T_prime((r/Rmax)) * cos(2.0 * theta) + dP((r/Rmax)) * cos(theta) - cos(theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_yq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-Delta_prime((r[i]/Rmax))) + E_prime((r[i]/Rmax)) * cos(theta) - T_prime((r[i]/Rmax)) * cos(2.0 * theta) + dP((r[i]/Rmax)) * cos(theta) - cos(theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::J_yq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-Delta_prime((r/Rmax))) + E_prime((r/Rmax)) * cos_theta[i] - T_prime((r/Rmax)) * cos(2.0 * theta[i]) + dP((r/Rmax)) * cos_theta[i] - cos_theta[i]) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::coeffs2(double r, double Rmax) const -{ - return 1.0 * exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::rho_glob(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::rho_glob(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::rho_glob(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::rho_pole(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::rho_pole(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::rho_pole(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedCulham::phi_exact(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::phi_exact(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedCulham::phi_exact(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniShiftedShafranov.cpp b/src/test_cases/PolarR6GyroZoniShiftedShafranov.cpp deleted file mode 100644 index 7975c455..00000000 --- a/src/test_cases/PolarR6GyroZoniShiftedShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniShiftedTriangular.cpp b/src/test_cases/PolarR6GyroZoniShiftedTriangular.cpp deleted file mode 100644 index 92ed8b7a..00000000 --- a/src/test_cases/PolarR6GyroZoniShiftedTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * (4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6GyroZoniTriangular.cpp b/src/test_cases/PolarR6GyroZoniTriangular.cpp deleted file mode 100644 index 037d654a..00000000 --- a/src/test_cases/PolarR6GyroZoniTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6GyroZoniTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6GyroZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6GyroZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) - pow((r[i]/Rmax), 4.0) * (4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) - pow((r/Rmax), 4.0) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6GyroZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::coeffs2(double r, double Rmax) const -{ - return exp(tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6GyroZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6GyroZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6GyroZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6PoissonCircular.cpp b/src/test_cases/PolarR6PoissonCircular.cpp deleted file mode 100644 index eed84386..00000000 --- a/src/test_cases/PolarR6PoissonCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -#include "PolarR6PoissonCircular.h" -#include -#include -#include - - -/*........................................*/ -double PolarR6PoissonCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6PoissonCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6PoissonCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6PoissonCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6PoissonCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6PoissonCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6PoissonCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); -} -/*........................................*/ -void PolarR6PoissonCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-INT64_C(1)))); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-INT64_C(1)))); - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6PoissonCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6PoissonCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6PoissonCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6PoissonCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6PoissonCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6PoissonCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * (14.7456 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 34.816 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)); -} -/*........................................*/ -void PolarR6PoissonCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * (14.7456 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 1.0 * (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 34.816 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)); - } -} -/*........................................*/ -void PolarR6PoissonCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * (14.7456 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) - 34.816 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])); - } -} -/*........................................*/ -double PolarR6PoissonCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6PoissonCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonCircular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void PolarR6PoissonCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double PolarR6PoissonCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6PoissonCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6PoissonCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6PoissonShafranov.cpp b/src/test_cases/PolarR6PoissonShafranov.cpp deleted file mode 100644 index 1a2d79b0..00000000 --- a/src/test_cases/PolarR6PoissonShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "PolarR6PoissonShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6PoissonShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6PoissonShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6PoissonShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6PoissonShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6PoissonShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6PoissonShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6PoissonShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 1.0 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 1.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6PoissonShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6PoissonShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void PolarR6PoissonShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6PoissonShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6PoissonShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6PoissonTriangular.cpp b/src/test_cases/PolarR6PoissonTriangular.cpp deleted file mode 100644 index 159ae12f..00000000 --- a/src/test_cases/PolarR6PoissonTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "PolarR6PoissonTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6PoissonTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6PoissonTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6PoissonTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6PoissonTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6PoissonTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6PoissonTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6PoissonTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6PoissonTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * (4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 1.0 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 1.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 1.0 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 1.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6PoissonTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6PoissonTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::coeffs1(double r, double Rmax) const -{ - return 1.0; -} -/*........................................*/ -void PolarR6PoissonTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6PoissonTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6PoissonTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6PoissonTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6PoissonTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6SonnendruckerCircular.cpp b/src/test_cases/PolarR6SonnendruckerCircular.cpp deleted file mode 100644 index 8bc1339f..00000000 --- a/src/test_cases/PolarR6SonnendruckerCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6SonnendruckerCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6SonnendruckerCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta))); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) / (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta))); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) / (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]))); - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6SonnendruckerCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6SonnendruckerShafranov.cpp b/src/test_cases/PolarR6SonnendruckerShafranov.cpp deleted file mode 100644 index 4a735338..00000000 --- a/src/test_cases/PolarR6SonnendruckerShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6SonnendruckerShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6SonnendruckerShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) * (208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / (sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) * (208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0)) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6SonnendruckerTriangular.cpp b/src/test_cases/PolarR6SonnendruckerTriangular.cpp deleted file mode 100644 index 7d10608e..00000000 --- a/src/test_cases/PolarR6SonnendruckerTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6SonnendruckerTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6SonnendruckerTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * (4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 5.03290747193186 * (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / ((208.641975308642 * pow(((r[i]/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - 22.6762679055362 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 5.03290747193186 * (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / ((208.641975308642 * pow(((r/Rmax) - 0.769230769230769), 2.0) + 1.0) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 27.0336 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::coeffs1(double r, double Rmax) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - return 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r/Rmax) - 11.1111111111111); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // see Kuehn et al. https://doi.org/10.1007/s10915-022-01802-1, Eq. (2.3) with Rmax=1.3 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.452961672473868 - 0.348432055749129 * atan(14.4444444444444 * (r[i]/Rmax) - 11.1111111111111); - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6SonnendruckerTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6SonnendruckerTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniCircular.cpp b/src/test_cases/PolarR6ZoniCircular.cpp deleted file mode 100644 index 7b3c40ae..00000000 --- a/src/test_cases/PolarR6ZoniCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6ZoniCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6ZoniCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6ZoniCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6ZoniCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6ZoniCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6ZoniCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6ZoniCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0))); -} -/*........................................*/ -void PolarR6ZoniCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0))); - } -} -/*........................................*/ -void PolarR6ZoniCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0))); - } -} -/*........................................*/ -double PolarR6ZoniCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6ZoniCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6ZoniCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniShafranov.cpp b/src/test_cases/PolarR6ZoniShafranov.cpp deleted file mode 100644 index de87f64e..00000000 --- a/src/test_cases/PolarR6ZoniShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6ZoniShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6ZoniShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniShiftedCircular.cpp b/src/test_cases/PolarR6ZoniShiftedCircular.cpp deleted file mode 100644 index 969760b1..00000000 --- a/src/test_cases/PolarR6ZoniShiftedCircular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0))); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0))); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0))); - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniShiftedShafranov.cpp b/src/test_cases/PolarR6ZoniShiftedShafranov.cpp deleted file mode 100644 index 45be29e6..00000000 --- a/src/test_cases/PolarR6ZoniShiftedShafranov.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r[i]/Rmax) * (map1_kappa - 1.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * ((-9.0112) * map1_delta * (r/Rmax) * (map1_kappa - 1.0) * pow(((r/Rmax) - 1.0), 6.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniShiftedTriangular.cpp b/src/test_cases/PolarR6ZoniShiftedTriangular.cpp deleted file mode 100644 index 626d1eb0..00000000 --- a/src/test_cases/PolarR6ZoniShiftedTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * (4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/PolarR6ZoniTriangular.cpp b/src/test_cases/PolarR6ZoniTriangular.cpp deleted file mode 100644 index 24de7daf..00000000 --- a/src/test_cases/PolarR6ZoniTriangular.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// PolarR6 simulates solution (22) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 -#include "PolarR6ZoniTriangular.h" -#include -#include - - -/*........................................*/ -double PolarR6ZoniTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void PolarR6ZoniTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void PolarR6ZoniTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double PolarR6ZoniTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6ZoniTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void PolarR6ZoniTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void PolarR6ZoniTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void PolarR6ZoniTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void PolarR6ZoniTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r[i]/Rmax), 4.0)) * (4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 27.0336 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (12.288 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 4.0) * cos(11.0 * theta) + 17.2032 * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (10.0 * pow(tanh(10.0 * (r[i]/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 49.5616 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * cos(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - 4.5056 * pow(((r[i]/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) * sin(11.0 * theta) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-27.0336) * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * sin(11.0 * theta) - 27.0336 * pow(((r[i]/Rmax) - 1.0), 6.0) * sin(11.0 * theta)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (2.4576 * (r[i]/Rmax) * pow(((r[i]/Rmax) - 1.0), 5.0) * cos(11.0 * theta) + 2.4576 * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow((r/Rmax), 4.0)) * (4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 4.5056 * (r/Rmax) * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 27.0336 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (12.288 * (r/Rmax) * pow(((r/Rmax) - 1.0), 4.0) * cos(11.0 * theta[i]) + 17.2032 * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (10.0 * pow(tanh(10.0 * (r/Rmax) - 5.0), 2.0) - 10.0) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 49.5616 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * cos(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - 4.5056 * pow(((r/Rmax) - 1.0), 6.0) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) * sin(11.0 * theta[i]) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-27.0336) * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * sin(11.0 * theta[i]) - 27.0336 * pow(((r/Rmax) - 1.0), 6.0) * sin(11.0 * theta[i])) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + 6.0 * (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (2.4576 * (r/Rmax) * pow(((r/Rmax) - 1.0), 5.0) * cos(11.0 * theta[i]) + 2.4576 * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(10.0 * (r/Rmax) - 5.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void PolarR6ZoniTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniTriangular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(10.0 * (r/Rmax) - 5.0)); -} -/*........................................*/ -void PolarR6ZoniTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(10.0 * (r[i]/Rmax) - 5.0)); - } -} -/*........................................*/ -double PolarR6ZoniTriangular::coeffs2(double r, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void PolarR6ZoniTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double PolarR6ZoniTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta); -} -/*........................................*/ -void PolarR6ZoniTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r[i]/Rmax), 6.0) * pow(((r[i]/Rmax) - 1.0), 6.0) * cos(11.0 * theta); - } -} -/*........................................*/ -void PolarR6ZoniTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.4096 * pow((r/Rmax), 6.0) * pow(((r/Rmax) - 1.0), 6.0) * cos(11.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/README.md b/src/test_cases/README.md deleted file mode 100644 index 6a9d9e60..00000000 --- a/src/test_cases/README.md +++ /dev/null @@ -1,16 +0,0 @@ -The following files define the geometry, coefficients of the ordinary differential equation and the manufactured solution. We always solve - -$-\nabla \cdot \left( \alpha \nabla u \right) + \beta u = f\quad \text{ in }\quad \Omega$ - -The naming is defined in `constants.h` and it follows the following rules: - -- The first part, e.g., `PolarR6` or `CartesianR6`, defines the manufactured solution. -- The **potential** second part `Gyro` or empty, defines if the $\beta$ coefficient is nontrivial or zero. -- The following part, e.g., `Sonnendrucker` or `Poisson`, defines the value of the $\alpha$ coefficient. -- The last part, e.g., `Shafranov` or `Triangular`, defines the geometry to be used - -For the particular solutions, see: -- Bourne et al. - Solver comparison for Poisson-like equations on tokamak geometries (2023) https://doi.org/10.1016/j.jcp.2023.112249 -- Kuehn, Kruse, Ruede - Implicitly extrapolated geometric multigrid on disk-like domains for the gyrokinetic Poisson equation from fusion plasma applications (2022) https://doi.org/10.1007/s10915-022-01802-1 - -A great thanks to Emily Bourne for preparing these scripts! \ No newline at end of file diff --git a/src/test_cases/RefinedGyroZoniShiftedCircular.cpp b/src/test_cases/RefinedGyroZoniShiftedCircular.cpp deleted file mode 100644 index f070e718..00000000 --- a/src/test_cases/RefinedGyroZoniShiftedCircular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "RefinedGyroZoniShiftedCircular.h" -#include -#include - - -/*........................................*/ -double RefinedGyroZoniShiftedCircular::x(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::x(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::x(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::y(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::y(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::y(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_rr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (cos(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_rr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_rr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (cos_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_rt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_rt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_rt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_tr(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (sin(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_tr(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_tr(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (sin_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_tt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_tt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_tt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_xs(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_xs(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin(theta), 2.0)) / cos(theta) + pow(cos(theta), (double)((-1))); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_xs(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-pow(sin_theta[i], 2.0)) / cos_theta[i] + pow(cos_theta[i], (double)((-1))); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_xt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return sin(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_xt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_xt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_ys(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return (-sin(theta)) / (r/Rmax); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_ys(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin(theta)) / (r[i]/Rmax); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_ys(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-sin_theta[i]) / (r/Rmax); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::J_yt(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return cos(theta) / (r/Rmax); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_yt(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos(theta) / (r[i]/Rmax); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::J_yt(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = cos_theta[i] / (r/Rmax); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::rho_glob(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - ((r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / (r/Rmax)) / (r/Rmax); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::rho_glob(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) - ((r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (r[i]/Rmax) * ((10000.0 * pow((0.45 - (r[i]/Rmax)), 2.0) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r[i]/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) + (21.0 * (7.0102993702666e-14 * ((r[i]/Rmax) * (r[i]/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r[i]/Rmax) * (r[i]/Rmax)) + 0.0162264454441452 * (r[i]/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / (r[i]/Rmax)) / (r[i]/Rmax); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::rho_glob(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - ((r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) + (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / (r/Rmax)) / (r/Rmax); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::rho_pole(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::rho_pole(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::rho_pole(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::coeffs1(double r, double Rmax) const -{ - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::coeffs2(double r, double Rmax) const -{ - return 1.0 * exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCircular::phi_exact(double r, double theta, double unused_1, double unused_2, double Rmax) const -{ - return ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::phi_exact(std::vector const& r, double theta, double unused_1, double unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCircular::phi_exact(double r, std::vector const& theta, double unused_1, double unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/RefinedGyroZoniShiftedCulham.cpp b/src/test_cases/RefinedGyroZoniShiftedCulham.cpp deleted file mode 100644 index 7dccf508..00000000 --- a/src/test_cases/RefinedGyroZoniShiftedCulham.cpp +++ /dev/null @@ -1,661 +0,0 @@ -#include "RefinedGyroZoniShiftedCulham.h" -#include -#include -#include -#include -#include - - -/*........................................*/ -double RefinedGyroZoniShiftedCulham::my_sum(std::array& f, int64_t start_idx, int64_t end_idx) const -{ - int64_t i; - double result; - result = 0.0; - #pragma omp parallel for reduction(+: result) - for (i = start_idx; i < end_idx; i += 1) - { - result += f[i]; - } - return result; -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::q(double rr) const -{ - return 0.8 - 0.1 * (rr * rr); -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::dq(double rr) const -{ - return (-0.2) * rr; -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::p(double rr) const -{ - return 100000.0 - 90000.0 * (rr * rr); -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::dp(double rr) const -{ - return (-180000.0) * rr; -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::dg(double rr, double g) const -{ - return ((-g) * (0.0625000000000001 * (rr * rr) / pow((1.0 - 0.125 * (rr * rr)), 2.0) + 2.0 / (4.0 - 0.5 * (rr * rr))) + 2.261946711816e-06 * (4.0 - 0.5 * (rr * rr)) / g) / (rr / (4.0 - 0.5 * (rr * rr)) + (4.0 - 0.5 * (rr * rr)) / (g * rr)); -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::double_deriv(double rr, double c, double g, double dg, double val, double d_val) const -{ - return c * val / (rr * rr) - d_val * (pow(rr, (double)((-1))) + (4.0 - 0.5 * (rr * rr)) * (2.0 * dg * rr / (4.0 - 0.5 * (rr * rr)) + 0.125 * g * (rr * rr) / pow((1.0 - 0.125 * (rr * rr)), 2.0) + 2.0 * g / (4.0 - 0.5 * (rr * rr))) / (g * rr)); -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::g(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return g_array[ri]; - } - else - { - m = (g_array[ri + 1] - g_array[ri]) / dr; - c = g_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::Delta(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return Delta_array[ri]; - } - else - { - m = (Delta_array[ri + 1] - Delta_array[ri]) / dr; - c = Delta_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::Delta_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return Delta_prime_array[ri]; - } - else - { - m = (Delta_prime_array[ri + 1] - Delta_prime_array[ri]) / dr; - c = Delta_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::E(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return E_array[ri]; - } - else - { - m = (E_array[ri + 1] - E_array[ri]) / dr; - c = E_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::T(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return T_array[ri]; - } - else - { - m = (T_array[ri + 1] - T_array[ri]) / dr; - c = T_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::E_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return E_prime_array[ri]; - } - else - { - m = (E_prime_array[ri + 1] - E_prime_array[ri]) / dr; - c = E_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::T_prime(double rr) const -{ - int64_t ri; - double dr; - double m; - double c; - ri = (int64_t)(rr * 1000 / 1.0); - dr = 1.0 / 1000.0; - if (ri == 1000) - { - return T_prime_array[ri]; - } - else - { - m = (T_prime_array[ri + 1] - T_prime_array[ri]) / dr; - c = T_prime_array[ri] - m * ri * dr; - return m * rr + c; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::P(double rr) const -{ - if (rr == 0) - { - return 0.0; - } - else - { - return 0.005 * pow(rr, 3.0) + 0.1 * rr * Delta(rr) - 0.1 * pow(E(rr), 2.0) - pow(T(rr), 2.0) / rr; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::dP(double rr) const -{ - if (rr == 0) - { - return 0.0; - } - else - { - return 0.015 * (rr * rr) + 0.1 * rr * Delta_prime(rr) + 0.1 * Delta(rr) - 0.2 * E(rr) * E_prime(rr) - 2.0 * T(rr) * T_prime(rr) / rr + pow(T(rr), 2.0) / (rr * rr); - } -} -/*........................................*/ -RefinedGyroZoniShiftedCulham::RefinedGyroZoniShiftedCulham() -{ - double rr; - double dr; - double dr_h; - std::array r; - int64_t i; - double dg_1; - double dE_1; - double dT_1; - double ddE_1; - double ddT_1; - double r2; - double g_2; - double dg_2; - double E_2; - double T_2; - double dE_2; - double dT_2; - double ddE_2; - double ddT_2; - double g_3; - double dg_3; - double E_3; - double T_3; - double dE_3; - double dT_3; - double ddE_3; - double ddT_3; - double g_4; - double dg_4; - double E_4; - double T_4; - double dE_4; - double dT_4; - double ddE_4; - double ddT_4; - double current_Ea; - double current_Ta; - std::array f; - std::array integ_contents; - double integral; - double current_Delta_a; - size_t i_0001; - rr = 0.0; - dr = 1.0 / 1000; - dr_h = dr * 0.5; - g_array[0] = 1.0; - E_array[0] = 0.0; - E_prime_array[0] = 1.0; - T_array[0] = 0.0; - T_prime_array[0] = 0.0; - r[0] = rr; - rr += dr; - r[1] = rr; - g_array[1] = 1.0; - E_array[1] = rr; - E_prime_array[1] = 1.0; - T_array[1] = rr * rr; - T_prime_array[1] = 2 * rr; - for (i = 1; i < 1000; i += 1) - { - /*Step 1*/ - dg_1 = dg(rr, g_array[i]); - dE_1 = E_prime_array[i]; - dT_1 = T_prime_array[i]; - ddE_1 = double_deriv(rr, 3.0, g_array[i], dg_1, E_array[i], E_prime_array[i]); - ddT_1 = double_deriv(rr, 8.0, g_array[i], dg_1, T_array[i], T_prime_array[i]); - /*Step 2*/ - r2 = rr + dr_h; - g_2 = g_array[i] + dr_h * dg_1; - dg_2 = dg(r2, g_2); - E_2 = E_array[i] + dE_1 * dr_h; - T_2 = T_array[i] + dT_1 * dr_h; - dE_2 = E_prime_array[i] + ddE_1 * dr_h; - dT_2 = T_prime_array[i] + ddT_1 * dr_h; - ddE_2 = double_deriv(r2, 3.0, g_2, dg_2, E_2, dE_2); - ddT_2 = double_deriv(r2, 8.0, g_2, dg_2, T_2, dT_2); - /*Step 3*/ - g_3 = g_array[i] + dr_h * dg_2; - dg_3 = dg(r2, g_3); - E_3 = E_array[i] + dE_2 * dr_h; - T_3 = T_array[i] + dT_2 * dr_h; - dE_3 = E_prime_array[i] + ddE_2 * dr_h; - dT_3 = T_prime_array[i] + ddT_2 * dr_h; - ddE_3 = double_deriv(r2, 3.0, g_3, dg_3, E_3, dE_3); - ddT_3 = double_deriv(r2, 8.0, g_3, dg_3, T_3, dT_3); - /*Step 4*/ - rr = rr + dr; - g_4 = g_array[i] + dr * dg_3; - dg_4 = dg(rr, g_4); - E_4 = E_array[i] + dE_3 * dr; - T_4 = T_array[i] + dT_3 * dr; - dE_4 = E_prime_array[i] + ddE_3 * dr; - dT_4 = T_prime_array[i] + ddT_3 * dr; - ddE_4 = double_deriv(rr, 3.0, g_4, dg_4, E_4, dE_4); - ddT_4 = double_deriv(rr, 8.0, g_4, dg_4, T_4, dT_4); - g_array[i + 1] = g_array[i] + dr * (dg_1 + 2 * dg_2 + 2 * dg_3 + dg_4) / 6.0; - E_array[i + 1] = E_array[i] + dr * (dE_1 + 2 * dE_2 + 2 * dE_3 + dE_4) / 6.0; - T_array[i + 1] = T_array[i] + dr * (dT_1 + 2 * dT_2 + 2 * dT_3 + dT_4) / 6.0; - E_prime_array[i + 1] = E_prime_array[i] + dr * (ddE_1 + 2 * ddE_2 + 2 * ddE_3 + ddE_4) / 6.0; - T_prime_array[i + 1] = T_prime_array[i] + dr * (ddT_1 + 2 * ddT_2 + 2 * ddT_3 + ddT_4) / 6.0; - r[i + 1] = rr; - } - current_Ea = E(1.0); - current_Ta = T(1.0); - for (i_0001 = 0; i_0001 < E_array.size(); i_0001 += 1) - { - E_array[i_0001] = 0.25 * E_array[i_0001] / current_Ea; - } - for (i_0001 = 0; i_0001 < T_array.size(); i_0001 += 1) - { - T_array[i_0001] = 0.1 * T_array[i_0001] / current_Ta; - } - for (i_0001 = 0; i_0001 < E_prime_array.size(); i_0001 += 1) - { - E_prime_array[i_0001] = 0.25 * E_prime_array[i_0001] / current_Ea; - } - for (i_0001 = 0; i_0001 < T_prime_array.size(); i_0001 += 1) - { - T_prime_array[i_0001] = 0.1 * T_prime_array[i_0001] / current_Ta; - } - for (i_0001 = 0; i_0001 < f.size(); i_0001 += 1) - { - f[i_0001] = r[i_0001] * g_array[i_0001] / 5.0 / q(r[i_0001]); - } - for (i_0001 = 0; i_0001 < integ_contents.size(); i_0001 += 1) - { - integ_contents[i_0001] = r[i_0001] * (f[i_0001] * f[i_0001]) - 2 * (r[i_0001] * r[i_0001]) * 1.25663706212e-06 * dp(r[i_0001]) / (1.0 * 1.0); - } - Delta_prime_array[0] = 0; - Delta_array[0] = 0; - integral = 0.0; - for (i = 1; i < 1000 + 1; i += 1) - { - integral += dr * (integ_contents[i - 1] + integ_contents[i]) * 0.5; - Delta_prime_array[i] = (-integral) / (5.0 * r[i] * pow(f[i], 2.0)); - Delta_array[i] = Delta_array[i - 1] + dr * 0.5 * (Delta_prime_array[i - 1] + Delta_prime_array[i]); - } - current_Delta_a = Delta(1.0); - for (i_0001 = 0; i_0001 < Delta_array.size(); i_0001 += 1) - { - Delta_array[i_0001] -= current_Delta_a; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::x(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta) + Delta((r/Rmax)) - E((r/Rmax)) * cos(theta) - P((r/Rmax)) * cos(theta) + T((r/Rmax)) * cos(2.0 * theta) + 5.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::x(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta) + Delta((r[i]/Rmax)) - E((r[i]/Rmax)) * cos(theta) - P((r[i]/Rmax)) * cos(theta) + T((r[i]/Rmax)) * cos(2.0 * theta) + 5.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::x(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i] + Delta((r/Rmax)) - E((r/Rmax)) * cos_theta[i] - P((r/Rmax)) * cos_theta[i] + T((r/Rmax)) * cos(2.0 * theta[i]) + 5.0; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::y(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * sin(theta) - E((r/Rmax)) * sin(theta) - P((r/Rmax)) * sin(theta) - T((r/Rmax)) * sin(2.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::y(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) - E((r[i]/Rmax)) * sin(theta) - P((r[i]/Rmax)) * sin(theta) - T((r[i]/Rmax)) * sin(2.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::y(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] - E((r/Rmax)) * sin_theta[i] - P((r/Rmax)) * sin_theta[i] - T((r/Rmax)) * sin(2.0 * theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_rr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (Delta_prime((r/Rmax)) - E_prime((r/Rmax)) * cos(theta) + T_prime((r/Rmax)) * cos(2.0 * theta) - dP((r/Rmax)) * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_rr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (Delta_prime((r[i]/Rmax)) - E_prime((r[i]/Rmax)) * cos(theta) + T_prime((r[i]/Rmax)) * cos(2.0 * theta) - dP((r[i]/Rmax)) * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_rr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (Delta_prime((r/Rmax)) - E_prime((r/Rmax)) * cos_theta[i] + T_prime((r/Rmax)) * cos(2.0 * theta[i]) - dP((r/Rmax)) * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_rt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (-(r/Rmax)) * sin(theta) + E((r/Rmax)) * sin(theta) + P((r/Rmax)) * sin(theta) - 2.0 * T((r/Rmax)) * sin(2.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_rt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r[i]/Rmax)) * sin(theta) + E((r[i]/Rmax)) * sin(theta) + P((r[i]/Rmax)) * sin(theta) - 2.0 * T((r[i]/Rmax)) * sin(2.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_rt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-(r/Rmax)) * sin_theta[i] + E((r/Rmax)) * sin_theta[i] + P((r/Rmax)) * sin_theta[i] - 2.0 * T((r/Rmax)) * sin(2.0 * theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_tr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-E_prime((r/Rmax))) * sin(theta) - T_prime((r/Rmax)) * sin(2.0 * theta) - dP((r/Rmax)) * sin(theta) + sin(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_tr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r[i]/Rmax))) * sin(theta) - T_prime((r[i]/Rmax)) * sin(2.0 * theta) - dP((r[i]/Rmax)) * sin(theta) + sin(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_tr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r/Rmax))) * sin_theta[i] - T_prime((r/Rmax)) * sin(2.0 * theta[i]) - dP((r/Rmax)) * sin_theta[i] + sin_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_tt(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return (r/Rmax) * cos(theta) - E((r/Rmax)) * cos(theta) - P((r/Rmax)) * cos(theta) - 2.0 * T((r/Rmax)) * cos(2.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_tt(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * cos(theta) - E((r[i]/Rmax)) * cos(theta) - P((r[i]/Rmax)) * cos(theta) - 2.0 * T((r[i]/Rmax)) * cos(2.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_tt(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * cos_theta[i] - E((r/Rmax)) * cos_theta[i] - P((r/Rmax)) * cos_theta[i] - 2.0 * T((r/Rmax)) * cos(2.0 * theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_xr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-(r/Rmax)) * cos(theta) + E((r/Rmax)) * cos(theta) + P((r/Rmax)) * cos(theta) + 2.0 * T((r/Rmax)) * cos(2.0 * theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_xr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r[i]/Rmax)) * cos(theta) + E((r[i]/Rmax)) * cos(theta) + P((r[i]/Rmax)) * cos(theta) + 2.0 * T((r[i]/Rmax)) * cos(2.0 * theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_xr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r/Rmax)) * cos_theta[i] + E((r/Rmax)) * cos_theta[i] + P((r/Rmax)) * cos_theta[i] + 2.0 * T((r/Rmax)) * cos(2.0 * theta[i])) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_xq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-(r/Rmax)) * sin(theta) + E((r/Rmax)) * sin(theta) + P((r/Rmax)) * sin(theta) - 2.0 * T((r/Rmax)) * sin(2.0 * theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_xq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r[i]/Rmax)) * sin(theta) + E((r[i]/Rmax)) * sin(theta) + P((r[i]/Rmax)) * sin(theta) - 2.0 * T((r[i]/Rmax)) * sin(2.0 * theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_xq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-(r/Rmax)) * sin_theta[i] + E((r/Rmax)) * sin_theta[i] + P((r/Rmax)) * sin_theta[i] - 2.0 * T((r/Rmax)) * sin(2.0 * theta[i])) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_yr(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-E_prime((r/Rmax))) * sin(theta) - T_prime((r/Rmax)) * sin(2.0 * theta) - dP((r/Rmax)) * sin(theta) + sin(theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_yr(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r[i]/Rmax))) * sin(theta) - T_prime((r[i]/Rmax)) * sin(2.0 * theta) - dP((r[i]/Rmax)) * sin(theta) + sin(theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_yr(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-E_prime((r/Rmax))) * sin_theta[i] - T_prime((r/Rmax)) * sin(2.0 * theta[i]) - dP((r/Rmax)) * sin_theta[i] + sin_theta[i]) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::J_yq(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-Delta_prime((r/Rmax))) + E_prime((r/Rmax)) * cos(theta) - T_prime((r/Rmax)) * cos(2.0 * theta) + dP((r/Rmax)) * cos(theta) - cos(theta)) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos(theta) + (r/Rmax) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) - (r/Rmax) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) + (r/Rmax) * dP((r/Rmax)) * pow(sin(theta), 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos(theta) + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos(theta) + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos(theta), 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + E((r/Rmax)) * pow(sin(theta), 2.0) + E((r/Rmax)) * pow(cos(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin(theta), 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * T_prime((r/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r/Rmax)) * T_prime((r/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin(theta), 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos(theta), 2.0) + P((r/Rmax)) * pow(sin(theta), 2.0) + P((r/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r/Rmax)) * cos(theta) * cos(2.0 * theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_yq(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-Delta_prime((r[i]/Rmax))) + E_prime((r[i]/Rmax)) * cos(theta) - T_prime((r[i]/Rmax)) * cos(2.0 * theta) + dP((r[i]/Rmax)) * cos(theta) - cos(theta)) / ((-(r[i]/Rmax)) * Delta_prime((r[i]/Rmax)) * cos(theta) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) + (r[i]/Rmax) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - (r[i]/Rmax) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) + (r[i]/Rmax) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0) + Delta_prime((r[i]/Rmax)) * E((r[i]/Rmax)) * cos(theta) + Delta_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * cos(theta) + 2.0 * Delta_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(2.0 * theta) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * E_prime((r[i]/Rmax)) * pow(cos(theta), 2.0) - E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + E((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - E((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + E((r[i]/Rmax)) * pow(sin(theta), 2.0) + E((r[i]/Rmax)) * pow(cos(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(sin(theta), 2.0) - E_prime((r[i]/Rmax)) * P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * E_prime((r[i]/Rmax)) * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + P((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(sin(theta), 2.0) - P((r[i]/Rmax)) * dP((r[i]/Rmax)) * pow(cos(theta), 2.0) + P((r[i]/Rmax)) * pow(sin(theta), 2.0) + P((r[i]/Rmax)) * pow(cos(theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(sin(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * T_prime((r[i]/Rmax)) * pow(cos(2.0 * theta), 2.0) + 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * dP((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta) - 2.0 * T((r[i]/Rmax)) * sin(theta) * sin(2.0 * theta) + 2.0 * T((r[i]/Rmax)) * cos(theta) * cos(2.0 * theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::J_yq(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-Delta_prime((r/Rmax))) + E_prime((r/Rmax)) * cos_theta[i] - T_prime((r/Rmax)) * cos(2.0 * theta[i]) + dP((r/Rmax)) * cos_theta[i] - cos_theta[i]) / ((-(r/Rmax)) * Delta_prime((r/Rmax)) * cos_theta[i] + (r/Rmax) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) + (r/Rmax) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - (r/Rmax) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) + (r/Rmax) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) + (r/Rmax) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0) + Delta_prime((r/Rmax)) * E((r/Rmax)) * cos_theta[i] + Delta_prime((r/Rmax)) * P((r/Rmax)) * cos_theta[i] + 2.0 * Delta_prime((r/Rmax)) * T((r/Rmax)) * cos(2.0 * theta[i]) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * E_prime((r/Rmax)) * pow(cos_theta[i], 2.0) - E((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + E((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - E((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - E((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + E((r/Rmax)) * pow(sin_theta[i], 2.0) + E((r/Rmax)) * pow(cos_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(sin_theta[i], 2.0) - E_prime((r/Rmax)) * P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * E_prime((r/Rmax)) * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * T_prime((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + P((r/Rmax)) * T_prime((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - P((r/Rmax)) * dP((r/Rmax)) * pow(sin_theta[i], 2.0) - P((r/Rmax)) * dP((r/Rmax)) * pow(cos_theta[i], 2.0) + P((r/Rmax)) * pow(sin_theta[i], 2.0) + P((r/Rmax)) * pow(cos_theta[i], 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(sin(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * T_prime((r/Rmax)) * pow(cos(2.0 * theta[i]), 2.0) + 2.0 * T((r/Rmax)) * dP((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * dP((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i]) - 2.0 * T((r/Rmax)) * sin_theta[i] * sin(2.0 * theta[i]) + 2.0 * T((r/Rmax)) * cos_theta[i] * cos(2.0 * theta[i])); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::coeffs2(double r, double Rmax) const -{ - return 1.0 * exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::rho_glob(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::rho_glob(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::rho_glob(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::rho_pole(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::rho_pole(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::rho_pole(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedCulham::phi_exact(double r, double theta, double map3_unused_1, double map3_unused_2, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::phi_exact(std::vector const& r, double theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedCulham::phi_exact(double r, std::vector const& theta, double map3_unused_1, double map3_unused_2, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ diff --git a/src/test_cases/RefinedGyroZoniShiftedShafranov.cpp b/src/test_cases/RefinedGyroZoniShiftedShafranov.cpp deleted file mode 100644 index 6966f995..00000000 --- a/src/test_cases/RefinedGyroZoniShiftedShafranov.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "RefinedGyroZoniShiftedShafranov.h" -#include -#include - - -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::x(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos(theta) + (r/Rmax) * cos(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::x(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r[i]/Rmax) * (r[i]/Rmax)) - map1_kappa * (r[i]/Rmax) * cos(theta) + (r[i]/Rmax) * cos(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::x(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-map1_delta) * ((r/Rmax) * (r/Rmax)) - map1_kappa * (r/Rmax) * cos_theta[i] + (r/Rmax) * cos_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::y(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return map1_kappa * (r/Rmax) * sin(theta) + (r/Rmax) * sin(theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::y(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r[i]/Rmax) * sin(theta) + (r[i]/Rmax) * sin(theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::y(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map1_kappa * (r/Rmax) * sin_theta[i] + (r/Rmax) * sin_theta[i]; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_rr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_rr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_rr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_rt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * sin(theta) - sin(theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_rt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * sin(theta) - sin(theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_rt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * sin_theta[i] - sin_theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_tr(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((map1_kappa + 1.0) * sin(theta))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_tr(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin(theta))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_tr(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((map1_kappa + 1.0) * sin_theta[i])/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_tt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (r/Rmax) * (map1_kappa * cos(theta) + cos(theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_tt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * (map1_kappa * cos(theta) + cos(theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_tt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * (map1_kappa * cos_theta[i] + cos_theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_xs(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (-cos(theta)) / (2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_xs(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos(theta)) / (2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * pow(sin(theta), 2.0) + map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_xs(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (-cos_theta[i]) / (2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_xt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos(theta) + 2.0 * map1_delta * (r/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_xt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin(theta) - sin(theta)) / (2.0 * map1_delta * map1_kappa * (r[i]/Rmax) * cos(theta) + 2.0 * map1_delta * (r[i]/Rmax) * cos(theta) + map1_kappa * map1_kappa * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * pow(cos(theta), 2.0) - pow(sin(theta), 2.0) - pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_xt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map1_kappa * sin_theta[i] - sin_theta[i]) / (2.0 * map1_delta * map1_kappa * (r/Rmax) * cos_theta[i] + 2.0 * map1_delta * (r/Rmax) * cos_theta[i] + map1_kappa * map1_kappa * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * pow(cos_theta[i], 2.0) - pow(sin_theta[i], 2.0) - pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_ys(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return sin(theta) / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_ys(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin(theta) / (2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_ys(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = sin_theta[i] / (2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::J_yt(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos(theta), 2.0) - (r/Rmax) * pow(sin(theta), 2.0) - (r/Rmax) * pow(cos(theta), 2.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_yt(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r[i]/Rmax) + map1_kappa * cos(theta) - cos(theta)) / (2.0 * map1_delta * map1_kappa * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 2.0 * map1_delta * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(sin(theta), 2.0) + map1_kappa * map1_kappa * (r[i]/Rmax) * pow(cos(theta), 2.0) - (r[i]/Rmax) * pow(sin(theta), 2.0) - (r[i]/Rmax) * pow(cos(theta), 2.0)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::J_yt(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (2.0 * map1_delta * (r/Rmax) + map1_kappa * cos_theta[i] - cos_theta[i]) / (2.0 * map1_delta * map1_kappa * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 2.0 * map1_delta * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + map1_kappa * map1_kappa * (r/Rmax) * pow(sin_theta[i], 2.0) + map1_kappa * map1_kappa * (r/Rmax) * pow(cos_theta[i], 2.0) - (r/Rmax) * pow(sin_theta[i], 2.0) - (r/Rmax) * pow(cos_theta[i], 2.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::rho_glob(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - (2.0 * map1_delta * (map1_kappa - 1.0) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - ((1.40205987405332e-13 * (r/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) + ((-0.0331692070000574) * (r/Rmax) - 9.0 * (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::rho_glob(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) - (2.0 * map1_delta * (map1_kappa - 1.0) * ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) * sin(theta) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (r[i]/Rmax) * ((10000.0 * pow((0.45 - (r[i]/Rmax)), 2.0) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r[i]/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) + (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) - ((1.40205987405332e-13 * (r[i]/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) + ((-0.0331692070000574) * (r[i]/Rmax) - 9.0 * (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * sin(theta) + 2.0 * map1_delta * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * sin(theta) * cos(theta) - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin(theta), 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * cos(theta) + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)), (3.0 / 2.0))) + (pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (21.0 * (7.0102993702666e-14 * ((r[i]/Rmax) * (r[i]/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r[i]/Rmax) * (r[i]/Rmax)) + 0.0162264454441452 * (r[i]/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta)) * ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0)))) / ((r[i]/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin(theta), 2.0) + pow(((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin(theta), 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r[i]/Rmax) - map1_kappa * cos(theta) + cos(theta)) * sin(theta) + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta)), 2.0))); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::rho_glob(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - (2.0 * map1_delta * (map1_kappa - 1.0) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) * sin_theta[i] / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-21.0) * ((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) - ((1.40205987405332e-13 * (r/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) + ((-0.0331692070000574) * (r/Rmax) - 9.0 * (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * ((-2.0) * map1_delta * (map1_kappa - 1.0) * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * sin_theta[i] + 2.0 * map1_delta * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0)) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (4.0 * map1_kappa * (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * sin_theta[i] * cos_theta[i] - 1.0 / 2.0 * (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) + 1.0 / 2.0 * ((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])) * (2.0 * pow((map1_kappa - 1.0), 2.0) * pow(sin_theta[i], 2.0) + 2.0 * (map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * cos_theta[i] + 2.0 * pow((map1_kappa + 1.0), 2.0) * cos(2.0 * theta[i]))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * pow(((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)), (3.0 / 2.0))) + (pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))) + (pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i]) + (2.0 * map1_kappa - 2.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i]) * ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0)))) / ((r/Rmax) * sqrt((pow((map1_kappa + 1.0), 2.0) * pow(sin_theta[i], 2.0) + pow(((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]), 2.0)) * (map1_kappa * map1_kappa - 4.0 * map1_kappa * pow(sin_theta[i], 2.0) + 2.0 * map1_kappa + 1.0) - pow(((map1_kappa - 1.0) * ((-2.0) * map1_delta * (r/Rmax) - map1_kappa * cos_theta[i] + cos_theta[i]) * sin_theta[i] + 1.0 / 2.0 * pow((map1_kappa + 1.0), 2.0) * sin(2.0 * theta[i])), 2.0))); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::rho_pole(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::rho_pole(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::rho_pole(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::coeffs2(double r, double Rmax) const -{ - return 1.0 * exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedShafranov::phi_exact(double r, double theta, double map1_kappa, double map1_delta, double Rmax) const -{ - return ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::phi_exact(std::vector const& r, double theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedShafranov::phi_exact(double r, std::vector const& theta, double map1_kappa, double map1_delta, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/test_cases/RefinedGyroZoniShiftedTriangular.cpp b/src/test_cases/RefinedGyroZoniShiftedTriangular.cpp deleted file mode 100644 index 0f2d14cf..00000000 --- a/src/test_cases/RefinedGyroZoniShiftedTriangular.cpp +++ /dev/null @@ -1,305 +0,0 @@ -#include "RefinedGyroZoniShiftedTriangular.h" -#include -#include - - -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::x(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::x(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::x(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (1.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) / map2_epsilon; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::y(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return map2_e * (r/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::y(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r[i]/Rmax) * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::y(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = map2_e * (r/Rmax) * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_rr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_rr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos(theta)) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_rr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-cos_theta[i]) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_rt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_rt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * sin(theta) / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_rt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * sin_theta[i] / sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_tr(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))/Rmax; -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_tr(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))/Rmax; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_tr(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))/Rmax; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_tt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_tt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r[i]/Rmax) * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_tt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (r/Rmax) * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_xs(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_xs(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin(theta), 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 6.0 * pow(map2_epsilon, 5.0) * (r[i]/Rmax) * cos(theta) + 8.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin(theta), 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(sin(theta), 2.0) * pow(cos(theta), 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 94.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 108.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * cos(theta) - 20.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * pow(cos(theta), 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin(theta), 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) * cos(theta) + 96.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 121.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) - 134.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(sin(theta), 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 41.0 * pow(sin(theta), 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 8.0 * pow(map2_epsilon, 4.0) * cos(theta) + 4.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * pow(cos(theta), 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(cos(theta), 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 48.0 * (map2_epsilon * map2_epsilon) * cos(theta) + 52.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * pow(cos(theta), 2.0) - 96.0 * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) - 40.0 * cos(theta)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_xs(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 6.0) * pow(sin_theta[i], 2.0) - pow(map2_epsilon, 6.0) + 5.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 6.0 * pow(map2_epsilon, 5.0) * (r/Rmax) * cos_theta[i] + 8.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 12.0 * pow(map2_epsilon, 4.0) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 8.0 * pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 27.0 * pow(map2_epsilon, 4.0) * pow(sin_theta[i], 2.0) - 27.0 * pow(map2_epsilon, 4.0) + 4.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 3.0) - 8.0 * pow(map2_epsilon, 3.0) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 3.0) - 26.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 94.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 108.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * cos_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) + 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) + 80.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * pow(cos_theta[i], 2.0) - 108.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 2.0) - 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 48.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 67.0 * (map2_epsilon * map2_epsilon) * pow(sin_theta[i], 2.0) - 67.0 * (map2_epsilon * map2_epsilon) - 82.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) * cos_theta[i] + 96.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 121.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] - 134.0 * map2_epsilon * (r/Rmax) * cos_theta[i] - 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(sin_theta[i], 2.0) + 40.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 41.0 * pow(sin_theta[i], 2.0) - 41.0) / (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 8.0 * pow(map2_epsilon, 4.0) * cos_theta[i] + 4.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 32.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * pow(cos_theta[i], 2.0) + 4.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 3.0) - 32.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(cos_theta[i], 3.0) + 26.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 48.0 * (map2_epsilon * map2_epsilon) * cos_theta[i] + 52.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * pow(cos_theta[i], 2.0) - 96.0 * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) + 41.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] - 40.0 * cos_theta[i]); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_xt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_xt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) - 2.0 * map2_epsilon * (r[i]/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin(theta)) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_xt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-(map2_epsilon * map2_epsilon)) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] - 2.0 * map2_epsilon * (r/Rmax) * sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i] * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - sqrt(4.0 - map2_epsilon * map2_epsilon) * sin_theta[i]) / (map2_e * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_ys(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos(theta) - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) + 13.0 * (r/Rmax)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_ys(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 6.0 * pow(map2_epsilon, 4.0) * sin(theta) + 3.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 20.0 * pow(map2_epsilon, 3.0) * (r[i]/Rmax) * sin(theta) * cos(theta) + 2.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * pow(cos(theta), 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * sin(theta) * pow(cos(theta), 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 20.0 * (map2_epsilon * map2_epsilon) * sin(theta) + 23.0 * map2_epsilon * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) * cos(theta) - 36.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * sin(theta) - 14.0 * sin(theta)) / (pow(map2_epsilon, 4.0) * (r[i]/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) + 4.0 * (map2_epsilon * map2_epsilon) * pow((r[i]/Rmax), 3.0) * pow(cos(theta), 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) - 12.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 28.0 * map2_epsilon * ((r[i]/Rmax) * (r[i]/Rmax)) * cos(theta) - 14.0 * (r[i]/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) + 13.0 * (r[i]/Rmax)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_ys(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = (pow(map2_epsilon, 4.0) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 6.0 * pow(map2_epsilon, 4.0) * sin_theta[i] + 3.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 20.0 * pow(map2_epsilon, 3.0) * (r/Rmax) * sin_theta[i] * cos_theta[i] + 2.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * pow(cos_theta[i], 2.0) - 16.0 * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * sin_theta[i] * pow(cos_theta[i], 2.0) + 14.0 * (map2_epsilon * map2_epsilon) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 20.0 * (map2_epsilon * map2_epsilon) * sin_theta[i] + 23.0 * map2_epsilon * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] * cos_theta[i] - 36.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] + 13.0 * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * sin_theta[i] - 14.0 * sin_theta[i]) / (pow(map2_epsilon, 4.0) * (r/Rmax) + 4.0 * pow(map2_epsilon, 3.0) * ((r/Rmax) * (r/Rmax)) * cos_theta[i] + 4.0 * (map2_epsilon * map2_epsilon) * pow((r/Rmax), 3.0) * pow(cos_theta[i], 2.0) - 6.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 14.0 * (map2_epsilon * map2_epsilon) * (r/Rmax) - 12.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 28.0 * map2_epsilon * ((r/Rmax) * (r/Rmax)) * cos_theta[i] - 14.0 * (r/Rmax) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) + 13.0 * (r/Rmax)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::J_yt(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r/Rmax)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_yt(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r[i]/Rmax) * cos(theta) + 1.0) * cos(theta) + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos(theta)) / (map2_e * (r[i]/Rmax)); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::J_yt(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 / 2.0 * ((-sqrt(4.0 - map2_epsilon * map2_epsilon)) * sqrt(map2_epsilon * map2_epsilon + 2.0 * map2_epsilon * (r/Rmax) * cos_theta[i] + 1.0) * cos_theta[i] + 2.0 * sqrt(4.0 - map2_epsilon * map2_epsilon) * cos_theta[i]) / (map2_e * (r/Rmax)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::rho_glob(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - ((r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((1.40205987405332e-13 * (r/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) + ((-0.0331692070000574) * (r/Rmax) - 9.0 * (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) + ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0))) + (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos(theta)) + 1.0)))); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::rho_glob(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)) - ((r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (r[i]/Rmax) * (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (r[i]/Rmax) * ((10000.0 * pow((0.45 - (r[i]/Rmax)), 2.0) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta) + (44444444.4444444 * pow((0.9 - (r[i]/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) + (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - (((-6.67647559073009e-15) * (r[i]/Rmax) + (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00368546744445083 * (r[i]/Rmax) + (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta)) * ((-2.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((1.40205987405332e-13 * (r[i]/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r[i]/Rmax)) * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) + ((-0.0331692070000574) * (r[i]/Rmax) - 9.0 * (45.0 - 100.0 * (r[i]/Rmax)) * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (20.0 * pow(tanh(20.0 * (r[i]/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (4.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (2.0 * map2_epsilon * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * map2_epsilon * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) + ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + ((-21.0) * ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * sin(21.0 * theta) - 9.0 * (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * sin(9.0 * theta)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * ((-4.0) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) * cos(theta) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0) - 2.0 * pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * sin(theta) * pow(cos(theta), 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 2.0) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r[i]/Rmax) * pow(cos(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + 2.0 * map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (2.0 * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r[i]/Rmax) * (r[i]/Rmax)) * pow(sin(theta), 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) - 2.0 * map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) + 2.0 * sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * pow(((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))), (3.0 / 2.0))) + (21.0 * (7.0102993702666e-14 * ((r[i]/Rmax) * (r[i]/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + 9.0 * ((-0.0165846035000287) * ((r[i]/Rmax) * (r[i]/Rmax)) + 0.0162264454441452 * (r[i]/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0))))) / ((r[i]/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) * (map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))) - sin(theta) * cos(theta) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r[i]/Rmax) * pow(sin(theta), 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(sin(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) * (pow((map2_e * map2_epsilon * (r[i]/Rmax) * sin(theta) * cos(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)) + map2_e * sin(theta) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))), 2.0) + pow(cos(theta), 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r[i]/Rmax) * cos(theta)) + 1.0)))); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::rho_glob(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * (((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * exp(tanh(20.0 * (r/Rmax) - 14.0)) - ((r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (r/Rmax) * (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (r/Rmax) * ((10000.0 * pow((0.45 - (r/Rmax)), 2.0) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.00368546744445083 - 100.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]) + (44444444.4444444 * pow((0.9 - (r/Rmax)), 2.0) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0)) - 6.67647559073009e-15 - 6666.66666666667 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-21.0) * ((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * sin(9.0 * theta[i])) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) + (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - (((-6.67647559073009e-15) * (r/Rmax) + (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00368546744445083 * (r/Rmax) + (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) - 0.0018029383826828) * cos(9.0 * theta[i])) * ((-2.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((1.40205987405332e-13 * (r/Rmax) - 21.0 * (6000.0 - 6666.66666666667 * (r/Rmax)) * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) + ((-0.0331692070000574) * (r/Rmax) - 9.0 * (45.0 - 100.0 * (r/Rmax)) * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0)) + 0.0162264454441452) * sin(9.0 * theta[i])) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (20.0 * pow(tanh(20.0 * (r/Rmax) - 14.0), 2.0) - 20.0) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (4.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(cos_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 4.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * ((-2.0) * map2_epsilon * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0)) - ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (2.0 * map2_epsilon * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * map2_epsilon * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) + ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + ((-21.0) * ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * sin(21.0 * theta[i]) - 9.0 * (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * sin(9.0 * theta[i])) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (1.0 / 2.0 * (((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * ((-4.0) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) * cos_theta[i] / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + 2.0 * ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-map2_e) * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 3.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0) - 2.0 * pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * sin_theta[i] * pow(cos_theta[i], 2.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (2.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) - 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 2.0) * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 4.0 * map2_e * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * map2_epsilon * (r/Rmax) * pow(cos_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + 2.0 * map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 1.0 / 2.0 * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (2.0 * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 3.0) / pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), 2.0) + ((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * ((-2.0) * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * pow((map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0), (3.0 / 2.0))) + 4.0 * map2_e * (map2_epsilon * map2_epsilon) * ((r/Rmax) * (r/Rmax)) * pow(sin_theta[i], 3.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 3.0) * (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 6.0 * map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) - 2.0 * map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) + 2.0 * sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * pow(((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))), (3.0 / 2.0))) + (21.0 * (7.0102993702666e-14 * ((r/Rmax) * (r/Rmax)) - 21.0 * exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + 9.0 * ((-0.0165846035000287) * ((r/Rmax) * (r/Rmax)) + 0.0162264454441452 * (r/Rmax) + 0.00036058767653656 - 9.0 * exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i])) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * exp(-tanh(20.0 * (r/Rmax) - 14.0)) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0))))) / ((r/Rmax) * sqrt((-pow((((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) * (map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))) - sin_theta[i] * cos_theta[i] / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0)) + (pow(((-map2_e) * map2_epsilon * (r/Rmax) * pow(sin_theta[i], 2.0) / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(sin_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) * (pow((map2_e * map2_epsilon * (r/Rmax) * sin_theta[i] * cos_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * pow((2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)), 2.0) * sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)) + map2_e * sin_theta[i] / (sqrt(1.0 - 1.0 / 4.0 * (map2_epsilon * map2_epsilon)) * (2.0 - sqrt(map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))), 2.0) + pow(cos_theta[i], 2.0) / (map2_epsilon * (map2_epsilon + 2.0 * (r/Rmax) * cos_theta[i]) + 1.0)))); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::rho_pole(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return 0.0; -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::rho_pole(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::rho_pole(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 0.0; - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::coeffs1(double r, double Rmax) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - return exp(-tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::coeffs1(std::vector const& r, double Rmax, std::vector& sol) const -{ // With Rmax=1, equals alpha(r) from equation (18) of Bourne et al. https://doi.org/10.1016/j.jcp.2023.112249 - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = exp(-tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::coeffs2(double r, double Rmax) const -{ - return 1.0 * exp(tanh(20.0 * (r/Rmax) - 14.0)); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::coeffs2(std::vector const& r, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = 1.0 * exp(tanh(20.0 * (r[i]/Rmax) - 14.0)); - } -} -/*........................................*/ -double RefinedGyroZoniShiftedTriangular::phi_exact(double r, double theta, double map2_epsilon, double map2_e, double Rmax) const -{ - return ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::phi_exact(std::vector const& r, double theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0 * (r[i]/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r[i]/Rmax) - 0.9), 2.0))) * cos(21.0 * theta) + (0.00184273372222541 * ((r[i]/Rmax) * (r[i]/Rmax)) - 0.0018029383826828 * (r[i]/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r[i]/Rmax) - 0.45), 2.0))) * cos(9.0 * theta); - } -} -/*........................................*/ -void RefinedGyroZoniShiftedTriangular::phi_exact(double r, std::vector const& theta, double map2_epsilon, double map2_e, double Rmax, std::vector& sol, std::vector& sin_theta, std::vector& cos_theta) const -{ - for (std::size_t i=0; i < sol.size(); ++i) - { - sol[i] = ((-3.33823779536505e-15) * ((r/Rmax) * (r/Rmax)) - 0.0 * (r/Rmax) - 0.0 + exp((-3333.33333333333) * pow(((r/Rmax) - 0.9), 2.0))) * cos(21.0 * theta[i]) + (0.00184273372222541 * ((r/Rmax) * (r/Rmax)) - 0.0018029383826828 * (r/Rmax) - 4.00652973929511e-05 + exp((-50.0) * pow(((r/Rmax) - 0.45), 2.0))) * cos(9.0 * theta[i]); - } -} -/*........................................*/ diff --git a/src/write_arrays_to_file.cpp_archive b/src/write_arrays_to_file.cpp_archive deleted file mode 100644 index 890cc540..00000000 --- a/src/write_arrays_to_file.cpp_archive +++ /dev/null @@ -1,101 +0,0 @@ -// utils::disp(fVec, "RHS"); -// std::ofstream myfile; -// // myfile.open("RHS.txt", std::ios_base::app); -// myfile.open("RHS.txt"); -// if (myfile.is_open()) { -// for (int i=0; i: +# --expt-extended-lambda --expt-relaxed-constexpr>) + +# # Link CUDA runtime library +# find_package(CUDAToolkit REQUIRED) +# target_link_libraries(test_gpu_vector PRIVATE CUDA::cudart) + +# # Add the test to CTest +# add_test(NAME test_gpu_vector COMMAND test_gpu_vector) + + + + + +include(GoogleTest) \ No newline at end of file diff --git a/tests/ExtrapolatedSmoother/extrapolated_smoother.cu b/tests/ExtrapolatedSmoother/extrapolated_smoother.cu new file mode 100644 index 00000000..e01e7f39 --- /dev/null +++ b/tests/ExtrapolatedSmoother/extrapolated_smoother.cu @@ -0,0 +1,214 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +#include "../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeCPU/extrapolatedSmoother.h" +#include "../../include/ExtrapolatedSmoother/ExtrapolatedSmootherTakeGPU/extrapolatedSmoother.h" + +#include + +namespace ExtrapolatedSmootherTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(ExtrapolatedSmootherTest, applyExtrapolatedSmoother_DirBC_Interior) + { + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + ExtrapolatedSmootherTakeCPU op_extrapolatedSmootherTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_extrapolatedSmootherTakeCPU.extrapolatedSmoothingInPlace(x, rhs, temp); + + result = x; + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + GPU_Vector gpu_temp(temp.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + copyHostToDevice(temp, gpu_temp); + + ExtrapolatedSmootherTakeGPU op_extrapolatedSmootherTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_extrapolatedSmootherTakeGPU.extrapolatedSmoothingInPlace(gpu_x, gpu_rhs, gpu_temp); + + host_result = Vector(gpu_x.size()); + copyDeviceToHost(gpu_x, host_result); + } + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-8; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } + + TEST(ExtrapolatedSmootherTest, applyExtrapolatedSmoother_AcrossOrigin) + { + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = false; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + ExtrapolatedSmootherTakeCPU op_extrapolatedSmootherTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_extrapolatedSmootherTakeCPU.extrapolatedSmoothingInPlace(x, rhs, temp); + + result = x; + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + GPU_Vector gpu_temp(temp.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + copyHostToDevice(temp, gpu_temp); + + ExtrapolatedSmootherTakeGPU op_extrapolatedSmootherTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_extrapolatedSmootherTakeGPU.extrapolatedSmoothingInPlace(gpu_x, gpu_rhs, gpu_temp); + + host_result = Vector(gpu_x.size()); + copyDeviceToHost(gpu_x, host_result); + } + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-8; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/extrapolated_prolongation.cu b/tests/Interpolation/extrapolated_prolongation.cu new file mode 100644 index 00000000..cca182b6 --- /dev/null +++ b/tests/Interpolation/extrapolated_prolongation.cu @@ -0,0 +1,71 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace ExtrapolatedProlongationTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(ExtrapolatedProlongationTest, applyExtrapolatedProlongation) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(coarse_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(finest_level.grid().numberOfNodes()); + GPU_Vector gpu_result(finest_level.grid().numberOfNodes()); + + interpolation_operator.applyExtrapolatedProlongation(coarse_level, finest_level, result, x); + interpolation_operator.applyExtrapolatedProlongation(coarse_level, finest_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + for (int i = 0; i < result.size(); ++i) { + ASSERT_DOUBLE_EQ(result[i], host_result[i]); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/extrapolated_restriction.cu b/tests/Interpolation/extrapolated_restriction.cu new file mode 100644 index 00000000..43309018 --- /dev/null +++ b/tests/Interpolation/extrapolated_restriction.cu @@ -0,0 +1,71 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace ExtrapolatedRestrictionTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(ExtrapolatedRestrictionTest, applyExtrapolatedRestriction) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(finest_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(coarse_level.grid().numberOfNodes()); + GPU_Vector gpu_result(coarse_level.grid().numberOfNodes()); + + interpolation_operator.applyExtrapolatedRestriction(finest_level, coarse_level, result, x); + interpolation_operator.applyExtrapolatedRestriction(finest_level, coarse_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + for (int i = 0; i < result.size(); ++i) { + ASSERT_DOUBLE_EQ(result[i], host_result[i]); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/fmg_interpolation.cu b/tests/Interpolation/fmg_interpolation.cu new file mode 100644 index 00000000..7baf391e --- /dev/null +++ b/tests/Interpolation/fmg_interpolation.cu @@ -0,0 +1,72 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace FMGInterpolationTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(FMGInterpolationTest, applyFMGInterpolation) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(coarse_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(finest_level.grid().numberOfNodes()); + GPU_Vector gpu_result(finest_level.grid().numberOfNodes()); + + interpolation_operator.applyFMGInterpolation(coarse_level, finest_level, result, x); + interpolation_operator.applyFMGInterpolation(coarse_level, finest_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + constexpr double precision = 1e-10; + for (size_t i = 0; i < result.size(); ++i) { + EXPECT_NEAR(result[i], host_result[i], precision); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/injection.cu b/tests/Interpolation/injection.cu new file mode 100644 index 00000000..302ab71c --- /dev/null +++ b/tests/Interpolation/injection.cu @@ -0,0 +1,71 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace InjectionTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(InjectionTest, applyInjection) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(finest_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(coarse_level.grid().numberOfNodes()); + GPU_Vector gpu_result(coarse_level.grid().numberOfNodes()); + + interpolation_operator.applyInjection(finest_level, coarse_level, result, x); + interpolation_operator.applyInjection(finest_level, coarse_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + for (int i = 0; i < result.size(); ++i) { + ASSERT_DOUBLE_EQ(result[i], host_result[i]); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/prolongation.cu b/tests/Interpolation/prolongation.cu new file mode 100644 index 00000000..36dfb9d2 --- /dev/null +++ b/tests/Interpolation/prolongation.cu @@ -0,0 +1,71 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace ProlongationTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(ProlongationTest, applyProlongation) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(coarse_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(finest_level.grid().numberOfNodes()); + GPU_Vector gpu_result(finest_level.grid().numberOfNodes()); + + interpolation_operator.applyProlongation(coarse_level, finest_level, result, x); + interpolation_operator.applyProlongation(coarse_level, finest_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + for (int i = 0; i < result.size(); ++i) { + ASSERT_DOUBLE_EQ(result[i], host_result[i]); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Interpolation/restriction.cu b/tests/Interpolation/restriction.cu new file mode 100644 index 00000000..bee45c90 --- /dev/null +++ b/tests/Interpolation/restriction.cu @@ -0,0 +1,71 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +namespace RestrictionTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(RestrictionTest, applyRestriction) + { + std::vector fine_radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector fine_angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = fine_radii.back(); + + ProcessingType processing_type = ProcessingType::CPU_HYBRID; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + + auto finest_grid = std::make_unique(fine_radii, fine_angles); + auto coarse_grid = std::make_unique(coarseningGrid(*finest_grid)); + + auto finest_levelCache = std::make_unique(processing_type, *finest_grid, density_profile_coefficients, domain_geometry); + auto coarse_levelCache = std::make_unique(processing_type, *coarse_grid, density_profile_coefficients, domain_geometry); + + Level finest_level(0, processing_type, std::move(finest_grid), std::move(finest_levelCache), extrapolation, FMG); + Level coarse_level(1, processing_type, std::move(coarse_grid), std::move(coarse_levelCache), extrapolation, FMG); + + Interpolation interpolation_operator(DirBC_Interior); + + Vector x = generate_random_sample_data(finest_level.grid(), 42); + GPU_Vector gpu_x(x.size()); + copyHostToDevice(x, gpu_x); + + Vector result(coarse_level.grid().numberOfNodes()); + GPU_Vector gpu_result(coarse_level.grid().numberOfNodes()); + + interpolation_operator.applyRestriction(finest_level, coarse_level, result, x); + interpolation_operator.applyRestriction(finest_level, coarse_level, gpu_result, gpu_x); + + Vector host_result(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + + ASSERT_EQ(result.size(), host_result.size()); + for (int i = 0; i < result.size(); ++i) { + ASSERT_DOUBLE_EQ(result[i], host_result[i]); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/LinearAlgebra/gpu_vector.cu b/tests/LinearAlgebra/gpu_vector.cu new file mode 100644 index 00000000..3afb7828 --- /dev/null +++ b/tests/LinearAlgebra/gpu_vector.cu @@ -0,0 +1,239 @@ +#include +#include + +#include "../../include/LinearAlgebra/Vector/gpu_vector.h" + +#define EXPECT_DOUBLE_COMPLEX_EQ(a, b) \ + do { \ + EXPECT_DOUBLE_EQ((a).real(), (b).real()); \ + EXPECT_DOUBLE_EQ((a).imag(), (b).imag()); \ + } while (0) + + +/* Default Construct (double) */ +TEST(GPU_VectorDouble, default_construct) +{ + const GPU_Vector v; + (void)v; +} + +/* Size Construct (double) */ +TEST(GPU_VectorDouble, size_construct) +{ + const Vector v = {1.0, 2.0, 3.0}; + + GPU_Vector gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + Vector host_v(gpu_v.size()); + copyDeviceToHost(gpu_v, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_EQ(host_v[0], 1.0); + EXPECT_DOUBLE_EQ(host_v[1], 2.0); + EXPECT_DOUBLE_EQ(host_v[2], 3.0); +} + + +/* Copy Construct (double) */ +TEST(GPU_VectorDouble, copy_construct) +{ + const Vector v = {1.0, 2.0, 3.0}; + + GPU_Vector gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector gpu_w = gpu_v; + + Vector host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_EQ(host_v[0], 1.0); + EXPECT_DOUBLE_EQ(host_v[1], 2.0); + EXPECT_DOUBLE_EQ(host_v[2], 3.0); +} + +/* Copy Assign (double) */ +TEST(GPU_VectorDouble, copy_assign) +{ + const Vector v = {1.0, 2.0, 3.0}; + + GPU_Vector gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector gpu_w; + gpu_w = gpu_v; + + Vector host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_EQ(host_v[0], 1.0); + EXPECT_DOUBLE_EQ(host_v[1], 2.0); + EXPECT_DOUBLE_EQ(host_v[2], 3.0); +} + +/* Move Construct (double) */ +TEST(GPU_VectorDouble, move_construct) +{ + const Vector v = {1.0, 2.0, 3.0}; + + GPU_Vector gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector gpu_w = std::move(gpu_v); + + Vector host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_EQ(host_v[0], 1.0); + EXPECT_DOUBLE_EQ(host_v[1], 2.0); + EXPECT_DOUBLE_EQ(host_v[2], 3.0); +} + +/* Move Assign (double) */ +TEST(GPU_VectorDouble, move_assign) +{ + const Vector v = {1.0, 2.0, 3.0}; + + GPU_Vector gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector gpu_w; + gpu_w = std::move(gpu_v); + + Vector host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_EQ(host_v[0], 1.0); + EXPECT_DOUBLE_EQ(host_v[1], 2.0); + EXPECT_DOUBLE_EQ(host_v[2], 3.0); +} + + +/* Default Construct (std::complex) */ +TEST(GPU_VectorComplex, default_construct) +{ + using namespace std::complex_literals; + const GPU_Vector> v; + (void)v; +} + +/* Size Construct (std::complex) */ +TEST(GPU_VectorComplex, size_construct) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + GPU_Vector> gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + Vector> host_v(gpu_v.size()); + copyDeviceToHost(gpu_v, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[2], 3.0 + 6.0i); +} + +/* Copy Construct (std::complex) */ +TEST(GPU_VectorComplex, copy_construct) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + GPU_Vector> gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector> gpu_w = gpu_v; + + Vector> host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[2], 3.0 + 6.0i); +} + +/* Copy Assign (std::complex) */ +TEST(GPU_VectorComplex, copy_assign) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + GPU_Vector> gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector> gpu_w; + gpu_w = gpu_v; + + Vector> host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[2], 3.0 + 6.0i); +} + +/* Move Construct (std::complex) */ +TEST(GPU_VectorComplex, move_construct) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + GPU_Vector> gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector> gpu_w = std::move(gpu_v); + + Vector> host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[2], 3.0 + 6.0i); +} + +/* Move Assign (std::complex) */ +TEST(GPU_VectorComplex, move_assign) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + GPU_Vector> gpu_v(v.size()); + ASSERT_EQ(gpu_v.size(), 3); + copyHostToDevice(v, gpu_v); + + GPU_Vector> gpu_w; + gpu_w = std::move(gpu_v); + + Vector> host_v(gpu_w.size()); + copyDeviceToHost(gpu_w, host_v); + + ASSERT_EQ(host_v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(host_v[2], 3.0 + 6.0i); +} + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/LinearAlgebra/gpu_vector_operations.cu b/tests/LinearAlgebra/gpu_vector_operations.cu new file mode 100644 index 00000000..a48b8232 --- /dev/null +++ b/tests/LinearAlgebra/gpu_vector_operations.cu @@ -0,0 +1,253 @@ +#include + +#include "../../include/LinearAlgebra/Vector/vector.h" +#include "../../include/LinearAlgebra/Vector/vector_operations.h" +#include "../../include/LinearAlgebra/Vector/gpu_vector.h" +#include "../../include/LinearAlgebra/Vector/gpu_vector_operations.h" + +/* void assign(GPU_Vector& lhs, const T& value); */ + +TEST(GPU_VectorOperations, assign_vector_scalar) +{ + Vector v = {1, 2, 3}; + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + assign(gpu_v, 5.0); + + Vector v_host(gpu_v.size()); + copyDeviceToHost(gpu_v, v_host); + + const Vector expected_result = {5, 5, 5}; + EXPECT_EQ(v_host.size(), expected_result.size()) << "Vector sizes do not match."; + for (size_t i = 0; i < v_host.size(); ++i) { + EXPECT_DOUBLE_EQ(v_host[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void add(GPU_Vector& result, const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, add_vector_vector) +{ + const Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + GPU_Vector gpu_v2(v2.size()); + copyHostToDevice(v2, gpu_v2); + + add(gpu_v1, gpu_v2); + + Vector v_host(gpu_v1.size()); + copyDeviceToHost(gpu_v1, v_host); + + const Vector expected_result = {0, -3, 5}; + EXPECT_EQ(v_host.size(), expected_result.size()) << "Vector sizes do not match."; + for (size_t i = 0; i < v_host.size(); ++i) { + EXPECT_DOUBLE_EQ(v_host[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void subtract(GPU_Vector& result, const GPU_Vector& x) */ + +TEST(GPU_VectorOperations, subtract_vector_vector) +{ + const Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + GPU_Vector gpu_v2(v2.size()); + copyHostToDevice(v2, gpu_v2); + + subtract(gpu_v1, gpu_v2); + + Vector v_host(gpu_v1.size()); + copyDeviceToHost(gpu_v1, v_host); + + const Vector expected_result = {2, 7, 1}; + EXPECT_EQ(v_host.size(), expected_result.size()) << "Vector sizes do not match."; + for (size_t i = 0; i < v_host.size(); ++i) { + EXPECT_DOUBLE_EQ(v_host[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void linear_combination(GPU_Vector& x, const T& alpha, const GPU_Vector& y, const T& beta); */ + +TEST(GPU_VectorOperations, linear_combination) +{ + const Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + + const double alpha = -3.0; + const double beta = 2.0; + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + GPU_Vector gpu_v2(v2.size()); + copyHostToDevice(v2, gpu_v2); + + linear_combination(gpu_v1, alpha, gpu_v2, beta); + + Vector v_host(gpu_v1.size()); + copyDeviceToHost(gpu_v1, v_host); + + const Vector expected_result = {-5.0, -16.0, -5.0}; + EXPECT_EQ(v_host.size(), expected_result.size()) << "Vector sizes do not match."; + for (size_t i = 0; i < v_host.size(); ++i) { + EXPECT_DOUBLE_EQ(v_host[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + + +/* void multiply(GPU_Vector& x, const T& alpha); */ + +TEST(GPU_VectorOperations, multiply_vector_scalar) +{ + const Vector v1 = {1, -2, 3}; + const double alpha = -3.0; + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + multiply(gpu_v1, alpha); + + Vector v_host(gpu_v1.size()); + copyDeviceToHost(gpu_v1, v_host); + + const Vector expected_result = {-3.0, 6.0, -9.0}; + EXPECT_EQ(v_host.size(), expected_result.size()) << "Vector sizes do not match."; + for (size_t i = 0; i < v_host.size(); ++i) { + EXPECT_DOUBLE_EQ(v_host[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* T dot_product(const GPU_Vector& lhs, const GPU_Vector& rhs); */ + +TEST(GPU_VectorOperations, dot_product) +{ + const Vector v1 = {1, 2, 3}; + const Vector v2 = {1, 5, 2}; + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + GPU_Vector gpu_v2(v2.size()); + copyHostToDevice(v2, gpu_v2); + + EXPECT_DOUBLE_EQ(dot_product(gpu_v1, gpu_v2), 17.0); +} + +/* T l1_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, l1_vector_norm) +{ + const Vector v = {1, -5, 2}; + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(l1_norm(gpu_v), 8.0); +} + +/* T l2_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, l2_vector_norm) +{ + const Vector v = {1, -5, 2}; + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(l2_norm(gpu_v), sqrt(30.0)); +} + +/* T infinity_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, infinity_vector_norm) +{ + const Vector v = {1, -5, 2}; + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(infinity_norm(gpu_v), 5.0); +} + +/* Test for larger GPU_Vectors */ + +/* T dot_product(const GPU_Vector& lhs, const GPU_Vector& rhs); */ + +TEST(GPU_VectorOperations, large_dot_product) +{ + const int n = 100000; + Vector v1(n); + Vector v2(n); + assign(v1, 2.0); + assign(v2, -3.0); + + GPU_Vector gpu_v1(v1.size()); + copyHostToDevice(v1, gpu_v1); + + GPU_Vector gpu_v2(v2.size()); + copyHostToDevice(v2, gpu_v2); + + EXPECT_DOUBLE_EQ(dot_product(v1, v2), n * 2.0 * (-3.0)); + EXPECT_DOUBLE_EQ(dot_product(gpu_v1, gpu_v2), n * 2.0 * (-3.0)); +} + +/* T l1_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, large_l1_vector_norm) +{ + const int n = 100000; + Vector v(n); + assign(v, -3.0); + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(l1_norm(v), n * 3.0); + EXPECT_DOUBLE_EQ(l1_norm(gpu_v), n * 3.0); +} + +/* T l2_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, large_l2_vector_norm) +{ + const int n = 100000; + Vector v(n); + assign(v, -3.0); + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(l2_norm(v), sqrt(n * (-3.0) * (-3.0))); + EXPECT_DOUBLE_EQ(l2_norm(gpu_v), sqrt(n * (-3.0) * (-3.0))); +} + +/* T infinity_norm(const GPU_Vector& x); */ + +TEST(GPU_VectorOperations, large_infinity_vector_norm) +{ + const int n = 100000; + Vector v(n); + assign(v, -3.0); + + GPU_Vector gpu_v(v.size()); + copyHostToDevice(v, gpu_v); + + EXPECT_DOUBLE_EQ(infinity_norm(v), 3.0); + EXPECT_DOUBLE_EQ(infinity_norm(gpu_v), 3.0); +} + + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/LinearAlgebra/matrix.cpp b/tests/LinearAlgebra/matrix.cpp new file mode 100644 index 00000000..33f05b37 --- /dev/null +++ b/tests/LinearAlgebra/matrix.cpp @@ -0,0 +1,240 @@ +#include + +#include "../../include/LinearAlgebra/Matrix/matrix.h" + +// Alias for readability +using triplet = std::tuple; + +/* Default Construct (double) */ + +TEST(SparseMatrixDouble, default_construct) +{ + const SparseMatrix m; + (void)m; +} + +/* Size Construct (double) */ + +TEST(SparseMatrixDouble, size_construct) +{ + const SparseMatrix m(5, 5, 0); + ASSERT_EQ(m.rows(), 5); + ASSERT_EQ(m.columns(), 5); + ASSERT_EQ(m.non_zero_size(), 0); +} + +/* Entries Construct (double) */ + +TEST(SparseMatrixDouble, entries_construct) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + const SparseMatrix m(3, 3, entries); + + ASSERT_EQ(m.rows(), 3); + ASSERT_EQ(m.columns(), 3); + ASSERT_EQ(m.non_zero_size(), 3); + + EXPECT_EQ(m.row_index(0), 0); + EXPECT_EQ(m.col_index(0), 0); + EXPECT_DOUBLE_EQ(m.value(0), 1.0); + + EXPECT_EQ(m.row_index(1), 1); + EXPECT_EQ(m.col_index(1), 2); + EXPECT_DOUBLE_EQ(m.value(1), 2.0); + + EXPECT_EQ(m.row_index(2), 2); + EXPECT_EQ(m.col_index(2), 1); + EXPECT_DOUBLE_EQ(m.value(2), 3.0); +} + +/* Copy Construct (double) */ + +TEST(SparseMatrixDouble, copy_construct) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + const SparseMatrix m1(3, 3, entries); + const SparseMatrix m2 = m1; + + ASSERT_EQ(m2.rows(), 3); + ASSERT_EQ(m2.columns(), 3); + ASSERT_EQ(m2.non_zero_size(), 3); + + EXPECT_EQ(m2.row_index(0), 0); + EXPECT_EQ(m2.col_index(0), 0); + EXPECT_DOUBLE_EQ(m2.value(0), 1.0); + + EXPECT_EQ(m2.row_index(1), 1); + EXPECT_EQ(m2.col_index(1), 2); + EXPECT_DOUBLE_EQ(m2.value(1), 2.0); + + EXPECT_EQ(m2.row_index(2), 2); + EXPECT_EQ(m2.col_index(2), 1); + EXPECT_DOUBLE_EQ(m2.value(2), 3.0); +} + +/* Move Construct (double) */ + +TEST(SparseMatrixDouble, move_construct) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + SparseMatrix m1(3, 3, entries); + + ASSERT_EQ(m1.rows(), 3); + ASSERT_EQ(m1.columns(), 3); + ASSERT_EQ(m1.non_zero_size(), 3); + + SparseMatrix m2 = std::move(m1); + + ASSERT_EQ(m2.rows(), 3); + ASSERT_EQ(m2.columns(), 3); + ASSERT_EQ(m2.non_zero_size(), 3); + + EXPECT_EQ(m2.row_index(0), 0); + EXPECT_EQ(m2.col_index(0), 0); + EXPECT_DOUBLE_EQ(m2.value(0), 1.0); + + EXPECT_EQ(m2.row_index(1), 1); + EXPECT_EQ(m2.col_index(1), 2); + EXPECT_DOUBLE_EQ(m2.value(1), 2.0); + + EXPECT_EQ(m2.row_index(2), 2); + EXPECT_EQ(m2.col_index(2), 1); + EXPECT_DOUBLE_EQ(m2.value(2), 3.0); +} + +/* Copy Assign (double) */ + +TEST(SparseMatrixDouble, copy_assign) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + const SparseMatrix m1(3, 3, entries); + SparseMatrix m2; + + m2 = m1; + + ASSERT_EQ(m2.rows(), 3); + ASSERT_EQ(m2.columns(), 3); + ASSERT_EQ(m2.non_zero_size(), 3); + + EXPECT_EQ(m2.row_index(0), 0); + EXPECT_EQ(m2.col_index(0), 0); + EXPECT_DOUBLE_EQ(m2.value(0), 1.0); + + EXPECT_EQ(m2.row_index(1), 1); + EXPECT_EQ(m2.col_index(1), 2); + EXPECT_DOUBLE_EQ(m2.value(1), 2.0); + + EXPECT_EQ(m2.row_index(2), 2); + EXPECT_EQ(m2.col_index(2), 1); + EXPECT_DOUBLE_EQ(m2.value(2), 3.0); +} + +/* Move Assign (double) */ + +TEST(SparseMatrixDouble, move_assign) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + SparseMatrix m1(3, 3, entries); + SparseMatrix m2; + + m2 = std::move(m1); + + ASSERT_EQ(m2.rows(), 3); + ASSERT_EQ(m2.columns(), 3); + ASSERT_EQ(m2.non_zero_size(), 3); + + EXPECT_EQ(m2.row_index(0), 0); + EXPECT_EQ(m2.col_index(0), 0); + EXPECT_DOUBLE_EQ(m2.value(0), 1.0); + + EXPECT_EQ(m2.row_index(1), 1); + EXPECT_EQ(m2.col_index(1), 2); + EXPECT_DOUBLE_EQ(m2.value(1), 2.0); + + EXPECT_EQ(m2.row_index(2), 2); + EXPECT_EQ(m2.col_index(2), 1); + EXPECT_DOUBLE_EQ(m2.value(2), 3.0); +} + +/* Value Modify (double) */ + +TEST(SparseMatrixDouble, value_modify) +{ + std::vector entries = {{0, 0, 1.0}, {1, 2, 2.0}, {2, 1, 3.0}}; + SparseMatrix m(3, 3, entries); + + ASSERT_EQ(m.rows(), 3); + ASSERT_EQ(m.columns(), 3); + ASSERT_EQ(m.non_zero_size(), 3); + + EXPECT_DOUBLE_EQ(m.value(2), 3.0); + + m.value(2) = 5.0; + EXPECT_DOUBLE_EQ(m.value(2), 5.0); +} + +/* Modify Construction (double) */ + +TEST(SparseMatrixDouble, modify_construction) +{ + const int rows = 4; + const int columns = 5; + const int nnz = 6; + SparseMatrix matrixA(rows, columns, nnz); + + matrixA.row_index(0) = 0; + matrixA.col_index(0) = 1; + matrixA.value(0) = 2.0; + + matrixA.row_index(1) = 1; + matrixA.col_index(1) = 0; + matrixA.value(1) = 8.0; + + matrixA.row_index(2) = 1; + matrixA.col_index(2) = 3; + matrixA.value(2) = -6.0; + + matrixA.row_index(3) = 2; + matrixA.col_index(3) = 0; + matrixA.value(3) = -5.0; + + matrixA.row_index(4) = 3; + matrixA.col_index(4) = 1; + matrixA.value(4) = 7.0; + + matrixA.row_index(5) = 3; + matrixA.col_index(5) = 3; + matrixA.value(5) = 3.0; + + ASSERT_EQ(matrixA.rows(), 4); + ASSERT_EQ(matrixA.columns(), 5); + ASSERT_EQ(matrixA.non_zero_size(), 6); + + std::vector entries = {{0, 1, 2.0}, {1, 0, 8.0}, {1, 3, -6.0}, {2, 0, -5.0}, {3, 1, 7.0}, {3, 3, 3.0}}; + + SparseMatrix matrixB(rows, columns, entries); + + for (int i = 0; i < nnz; i++) { + ASSERT_EQ(matrixA.row_index(i), matrixB.row_index(i)); + ASSERT_EQ(matrixA.col_index(i), matrixB.col_index(i)); + EXPECT_DOUBLE_EQ(matrixA.value(i), matrixB.value(i)); + } +} + +/* Symmetry Check (double) */ + +TEST(SparseMatrixDouble, symmetry_check) +{ + std::vector entries = {{0, 1, 2.0}, {1, 1, -3.0}, {1, 2, 3.0}}; + SparseMatrix m(3, 3, entries); + + ASSERT_FALSE(m.is_symmetric()); + m.is_symmetric(true); + ASSERT_TRUE(m.is_symmetric()); +} + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/LinearAlgebra/vector.cpp b/tests/LinearAlgebra/vector.cpp new file mode 100644 index 00000000..4f05fd18 --- /dev/null +++ b/tests/LinearAlgebra/vector.cpp @@ -0,0 +1,463 @@ +#include "../../include/LinearAlgebra/Vector/vector.h" + +#include +#include + +#define EXPECT_DOUBLE_COMPLEX_EQ(a, b) \ + do { \ + EXPECT_DOUBLE_EQ((a).real(), (b).real()); \ + EXPECT_DOUBLE_EQ((a).imag(), (b).imag()); \ + } while (0) + +// -------------- // +// Vector // +// -------------- // + +/* Default Construct (double) */ +TEST(VectorDouble, default_construct) +{ + const Vector v; + (void)v; +} + +/* Value Construct (double) */ + +TEST(VectorDouble, value_construct) +{ + const Vector v = {1.0, 2.0, 3.0}; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_EQ(v[0], 1.0); + EXPECT_DOUBLE_EQ(v[1], 2.0); + EXPECT_DOUBLE_EQ(v[2], 3.0); +} + +/* Size Construct (double) */ + +TEST(VectorDouble, size_construct) +{ + const Vector v(5); + ASSERT_EQ(v.size(), 5); +} + +/* Copy Construct (double) */ + +TEST(VectorDouble, copy_construct) +{ + const Vector v1 = {1.0, 2.0, 3.0}; + const Vector v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_EQ(v1[0], 1.0); + EXPECT_DOUBLE_EQ(v1[1], 2.0); + EXPECT_DOUBLE_EQ(v1[2], 3.0); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); +} + +/* Copy Assign (double) */ + +TEST(VectorDouble, copy_assign) +{ + Vector v2; + + { + const Vector v1 = {1.0, 2.0, 3.0}; + v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_EQ(v1[0], 1.0); + EXPECT_DOUBLE_EQ(v1[1], 2.0); + EXPECT_DOUBLE_EQ(v1[2], 3.0); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); +} + +/* Move Construct (double) */ + +TEST(VectorDouble, move_construct) +{ + Vector v1 = {1.0, 2.0, 3.0}; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_EQ(v1[0], 1.0); + EXPECT_DOUBLE_EQ(v1[1], 2.0); + EXPECT_DOUBLE_EQ(v1[2], 3.0); + + const Vector v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); +} + +/* Move Assign (double) */ + +TEST(VectorDouble, move_assign) +{ + Vector v2; + + { + const Vector v1 = {1.0, 2.0, 3.0}; + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_EQ(v1[0], 1.0); + EXPECT_DOUBLE_EQ(v1[1], 2.0); + EXPECT_DOUBLE_EQ(v1[2], 3.0); + + v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_EQ(v2[0], 1.0); + EXPECT_DOUBLE_EQ(v2[1], 2.0); + EXPECT_DOUBLE_EQ(v2[2], 3.0); +} + +/* Value Construct Modify (double) */ + +TEST(VectorDouble, value_construct_modify) +{ + Vector v = {1.0, 2.0, 3.0}; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_EQ(v[0], 1.0); + EXPECT_DOUBLE_EQ(v[1], 2.0); + EXPECT_DOUBLE_EQ(v[2], 3.0); + + v[2] = 5.0; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_EQ(v[0], 1.0); + EXPECT_DOUBLE_EQ(v[1], 2.0); + EXPECT_DOUBLE_EQ(v[2], 5.0); +} + +/* Size Construct Modify (double) */ + +TEST(VectorDouble, size_construct_modify) +{ + Vector v(5); + ASSERT_EQ(v.size(), 5); + + v[0] = 1.0; + v[1] = 2.0; + v[2] = 3.0; + v[3] = 4.0; + v[4] = 5.0; + + EXPECT_DOUBLE_EQ(v[0], 1.0); + EXPECT_DOUBLE_EQ(v[1], 2.0); + EXPECT_DOUBLE_EQ(v[2], 3.0); + EXPECT_DOUBLE_EQ(v[3], 4.0); + EXPECT_DOUBLE_EQ(v[4], 5.0); +} + +// ------------- // +// Vector // +// ------------- // + +TEST(VectorFloat, default_construct) +{ + const Vector v; + (void)v; +} + +TEST(VectorFloat, value_construct) +{ + const Vector v = {1.0, 2.0, 3.0}; + ASSERT_EQ(v.size(), 3); + EXPECT_FLOAT_EQ(v[0], 1.0); + EXPECT_FLOAT_EQ(v[1], 2.0); + EXPECT_FLOAT_EQ(v[2], 3.0); +} + +TEST(VectorFloat, size_construct) +{ + const Vector v(5); + ASSERT_EQ(v.size(), 5); +} + +TEST(VectorFloat, copy_construct) +{ + const Vector v1 = {1.0, 2.0, 3.0}; + const Vector v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_FLOAT_EQ(v1[0], 1.0); + EXPECT_FLOAT_EQ(v1[1], 2.0); + EXPECT_FLOAT_EQ(v1[2], 3.0); + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); +} + +TEST(VectorFloat, copy_assign) +{ + Vector v2; + + { + const Vector v1 = {1.0, 2.0, 3.0}; + v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_FLOAT_EQ(v1[0], 1.0); + EXPECT_FLOAT_EQ(v1[1], 2.0); + EXPECT_FLOAT_EQ(v1[2], 3.0); + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); +} + +TEST(VectorFloat, move_construct) +{ + Vector v1 = {1.0, 2.0, 3.0}; + + ASSERT_EQ(v1.size(), 3); + EXPECT_FLOAT_EQ(v1[0], 1.0); + EXPECT_FLOAT_EQ(v1[1], 2.0); + EXPECT_FLOAT_EQ(v1[2], 3.0); + + const Vector v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); +} + +TEST(VectorFloat, move_assign) +{ + Vector v2; + + { + const Vector v1 = {1.0, 2.0, 3.0}; + ASSERT_EQ(v1.size(), 3); + EXPECT_FLOAT_EQ(v1[0], 1.0); + EXPECT_FLOAT_EQ(v1[1], 2.0); + EXPECT_FLOAT_EQ(v1[2], 3.0); + + v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_FLOAT_EQ(v2[0], 1.0); + EXPECT_FLOAT_EQ(v2[1], 2.0); + EXPECT_FLOAT_EQ(v2[2], 3.0); +} + +TEST(VectorFloat, value_construct_modify) +{ + Vector v = {1.0, 2.0, 3.0}; + ASSERT_EQ(v.size(), 3); + EXPECT_FLOAT_EQ(v[0], 1.0); + EXPECT_FLOAT_EQ(v[1], 2.0); + EXPECT_FLOAT_EQ(v[2], 3.0); + + v[2] = 5.0; + ASSERT_EQ(v.size(), 3); + EXPECT_FLOAT_EQ(v[0], 1.0); + EXPECT_FLOAT_EQ(v[1], 2.0); + EXPECT_FLOAT_EQ(v[2], 5.0); +} + +TEST(VectorFloat, size_construct_modify) +{ + Vector v(5); + ASSERT_EQ(v.size(), 5); + + v[0] = 1.0; + v[1] = 2.0; + v[2] = 3.0; + v[3] = 4.0; + v[4] = 5.0; + + EXPECT_FLOAT_EQ(v[0], 1.0); + EXPECT_FLOAT_EQ(v[1], 2.0); + EXPECT_FLOAT_EQ(v[2], 3.0); + EXPECT_FLOAT_EQ(v[3], 4.0); + EXPECT_FLOAT_EQ(v[4], 5.0); +} + +// ---------------------------- // +// Vector> // +// ---------------------------- // + +TEST(VectorDoubleComplex, default_construct) +{ + const Vector> v; + (void)v; +} + +TEST(VectorDoubleComplex, value_construct) +{ + using namespace std::complex_literals; + const Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[2], 3.0 + 6.0i); +} + +TEST(VectorDoubleComplex, size_construct) +{ + const Vector> v(5); + ASSERT_EQ(v.size(), 5); +} + +TEST(VectorDoubleComplex, copy_construct) +{ + using namespace std::complex_literals; + const Vector> v1 = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + const Vector> v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v1[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[2], 3.0 + 6.0i); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); +} + +TEST(VectorDoubleComplex, copy_assign) +{ + using namespace std::complex_literals; + Vector> v2; + + { + const Vector> v1 = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + v2 = v1; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v1[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[2], 3.0 + 6.0i); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); +} + +TEST(VectorDoubleComplex, move_construct) +{ + using namespace std::complex_literals; + Vector> v1 = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v1[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[2], 3.0 + 6.0i); + + const Vector> v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); +} + +TEST(VectorDoubleComplex, move_assign) +{ + using namespace std::complex_literals; + Vector> v2; + + { + const Vector> v1 = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + ASSERT_EQ(v1.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v1[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v1[2], 3.0 + 6.0i); + + v2 = std::move(v1); + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); + } + + ASSERT_EQ(v2.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v2[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v2[2], 3.0 + 6.0i); +} + +TEST(VectorDoubleComplex, value_construct_modify) +{ + using namespace std::complex_literals; + Vector> v = {1.0 + 4.0i, 2.0 + 5.0i, 3.0 + 6.0i}; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[2], 3.0 + 6.0i); + + v[2] = 5.0; + ASSERT_EQ(v.size(), 3); + EXPECT_DOUBLE_COMPLEX_EQ(v[0], 1.0 + 4.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[1], 2.0 + 5.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[2], 5.0 + 0.0i); +} + +TEST(VectorDoubleComplex, size_construct_modify) +{ + using namespace std::complex_literals; + Vector> v(5); + ASSERT_EQ(v.size(), 5); + + v[0] = 1.0 + 6.0i; + v[1] = 2.0 + 7.0i; + v[2] = 3.0 + 8.0i; + v[3] = 4.0 + 9.0i; + v[4] = 5.0 + 10.0i; + + EXPECT_DOUBLE_COMPLEX_EQ(v[0], 1.0 + 6.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[1], 2.0 + 7.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[2], 3.0 + 8.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[3], 4.0 + 9.0i); + EXPECT_DOUBLE_COMPLEX_EQ(v[4], 5.0 + 10.0i); +} + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/LinearAlgebra/vector_operations.cpp b/tests/LinearAlgebra/vector_operations.cpp new file mode 100644 index 00000000..68c30b83 --- /dev/null +++ b/tests/LinearAlgebra/vector_operations.cpp @@ -0,0 +1,119 @@ +#include + +#include "../../include/LinearAlgebra/Vector/vector.h" +#include "../../include/LinearAlgebra/Vector/vector_operations.h" + +/* void assign(Vector& lhs, const T& value); */ + +TEST(VectorOperations, assign_vector_scalar) +{ + Vector v = {1, 2, 3}; + assign(v, 5.0); + const Vector expected_result = {5, 5, 5}; + + EXPECT_EQ(v.size(), expected_result.size()) << "Vector sizes do not match."; + for (int i = 0; i < v.size(); ++i) { + EXPECT_DOUBLE_EQ(v[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void add(Vector& result, const Vector& x); */ + +TEST(VectorOperations, add_vector_vector) +{ + Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + add(v1, v2); + const Vector expected_result = {0, -3, 5}; + + EXPECT_EQ(v1.size(), expected_result.size()) << "Vector sizes do not match."; + for (int i = 0; i < v1.size(); ++i) { + EXPECT_DOUBLE_EQ(v1[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void subtract(Vector& result, const Vector& x) */ + +TEST(VectorOperations, subtract_vector_vector) +{ + Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + subtract(v1, v2); + const Vector expected_result = {2, 7, 1}; + + EXPECT_EQ(v1.size(), expected_result.size()) << "Vector sizes do not match."; + for (int i = 0; i < v1.size(); ++i) { + EXPECT_DOUBLE_EQ(v1[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void linear_combination(Vector& x, const T& alpha, const Vector& y, const T& beta); */ + +TEST(VectorOperations, linear_combination) +{ + Vector v1 = {1, 2, 3}; + const Vector v2 = {-1, -5, 2}; + const double alpha = -3.0; + const double beta = 2.0; + linear_combination(v1, alpha, v2, beta); + const Vector expected_result = {-5.0, -16.0, -5.0}; + + EXPECT_EQ(v1.size(), expected_result.size()) << "Vector sizes do not match."; + for (int i = 0; i < v1.size(); ++i) { + EXPECT_DOUBLE_EQ(v1[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* void multiply(Vector& x, const T& alpha); */ + +TEST(VectorOperations, multiply_vector_scalar) +{ + Vector v1 = {1, -2, 3}; + const double alpha = -3.0; + multiply(v1, alpha); + const Vector expected_result = {-3.0, 6.0, -9.0}; + + EXPECT_EQ(v1.size(), expected_result.size()) << "Vector sizes do not match."; + for (int i = 0; i < v1.size(); ++i) { + EXPECT_DOUBLE_EQ(v1[i], expected_result[i]) << "Element mismatch at index " << i; + } +} + +/* T dot_product(const Vector& lhs, const Vector& rhs); */ + +TEST(VectorOperations, dot_product) +{ + const Vector v1 = {1, 2, 3}; + const Vector v2 = {1, 5, 2}; + EXPECT_DOUBLE_EQ(dot_product(v1, v2), 17.0); +} + +/* T l1_norm(const Vector& x); */ + +TEST(VectorOperations, l1_vector_norm) +{ + const Vector v = {1, -5, 2}; + EXPECT_DOUBLE_EQ(l1_norm(v), 8.0); +} + +/* T l2_norm(const Vector& x); */ + +TEST(VectorOperations, l2_vector_norm) +{ + const Vector v = {1, -5, 2}; + EXPECT_DOUBLE_EQ(l2_norm(v), sqrt(30.0)); +} + +/* T infinity_norm(const Vector& x); */ + +TEST(VectorOperations, infinity_vector_norm) +{ + const Vector v = {1, -5, 2}; + EXPECT_DOUBLE_EQ(infinity_norm(v), 5.0); +} + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/PolarGrid/polargrid.cpp b/tests/PolarGrid/polargrid.cpp new file mode 100644 index 00000000..af2706b3 --- /dev/null +++ b/tests/PolarGrid/polargrid.cpp @@ -0,0 +1,53 @@ +#include +#include "../../include/PolarGrid/polargrid.h" + +#include +#include + +TEST(PolarGridTest, VectorConstructor) +{ + std::vector radii = {0.1, 0.2, 0.5, 0.9, 1.3}; + std::vector angles = {0, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + PolarGrid grid(radii, angles); +} + +TEST(PolarGridTest, NumberOfNodes) +{ + std::vector radii = {0.1, 0.2, 0.5, 0.9, 1.3}; + std::vector angles = {0, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + PolarGrid grid(radii, angles); + ASSERT_EQ(grid.numberOfNodes(), radii.size() * (angles.size() - 1)); +} + +TEST(PolarGridTest, AccessorsTest) +{ + std::vector radii = {0.1, 0.2, 0.5, 0.9, 1.3}; + std::vector angles = {0, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + PolarGrid grid(radii, angles); + ASSERT_DOUBLE_EQ(grid.radius(0), 0.1); + ASSERT_DOUBLE_EQ(grid.radius(1), 0.2); + ASSERT_DOUBLE_EQ(grid.radius(4), 1.3); + ASSERT_DOUBLE_EQ(grid.theta(0), 0); + ASSERT_DOUBLE_EQ(grid.theta(1), M_PI / 8); + ASSERT_DOUBLE_EQ(grid.theta(4), M_PI + M_PI / 8); +} + +TEST(PolarGridTest, GridJumpTest) +{ + std::vector radii = {0.1, 0.2, 0.5, 0.9, 1.3}; + std::vector angles = {0, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + double splitting_radius = 0.4; + PolarGrid grid(radii, angles, splitting_radius); + ASSERT_DOUBLE_EQ(grid.radius(0), 0.1); + ASSERT_DOUBLE_EQ(grid.radius(1), 0.2); + ASSERT_DOUBLE_EQ(grid.radius(4), 1.3); + ASSERT_DOUBLE_EQ(grid.theta(0), 0); + ASSERT_DOUBLE_EQ(grid.theta(1), M_PI / 8); + ASSERT_DOUBLE_EQ(grid.theta(4), M_PI + M_PI / 8); +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Residual/residual.cu b/tests/Residual/residual.cu new file mode 100644 index 00000000..0db1c344 --- /dev/null +++ b/tests/Residual/residual.cu @@ -0,0 +1,181 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +#include "../../include/Residual/ResidualTakeCPU/residual.h" +#include "../../include/Residual/ResidualTakeGPU/residual.h" + +namespace ResidualTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(ResidualTest, applyResidual_DirBC_Interior) + { + std::vector radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = radii.back(); + + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + auto grid = std::make_unique(radii, angles); + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + + ResidualTakeCPU op_residualTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + result = Vector (level.grid().numberOfNodes()); + op_residualTakeCPU.computeResidual(result, rhs, x); + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + auto grid = std::make_unique(radii, angles); + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + + GPU_Vector gpu_result(level.grid().numberOfNodes()); + ResidualTakeGPU op_residualTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_residualTakeGPU.computeResidual(gpu_result, gpu_rhs, gpu_x); + + host_result = Vector(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + } + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-10; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } + + TEST(ResidualTest, applyResidualAcrossOrigin) + { + std::vector radii = {0.1, 0.2, 0.25, 0.5, 0.8, 0.9, 1.3, 1.4, 2.0}; + std::vector angles = { + 0, M_PI / 16, M_PI / 8, M_PI / 2, M_PI, M_PI + M_PI / 16, M_PI + M_PI / 8, M_PI + M_PI / 2, M_PI + M_PI}; + + double Rmax = radii.back(); + + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = false; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + auto grid = std::make_unique(radii, angles); + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + + ResidualTakeCPU op_residualTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + result = Vector (level.grid().numberOfNodes()); + op_residualTakeCPU.computeResidual(result, rhs, x); + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + auto grid = std::make_unique(radii, angles); + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + + GPU_Vector gpu_result(level.grid().numberOfNodes()); + ResidualTakeGPU op_residualTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_residualTakeGPU.computeResidual(gpu_result, gpu_rhs, gpu_x); + + host_result = Vector(gpu_result.size()); + copyDeviceToHost(gpu_result, host_result); + } + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-10; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } + +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/Smoother/smoother.cu b/tests/Smoother/smoother.cu new file mode 100644 index 00000000..2218faa3 --- /dev/null +++ b/tests/Smoother/smoother.cu @@ -0,0 +1,217 @@ +#include +#include + +#include "../../include/GMGPolar/gmgpolar.h" + +#include "../../include/Smoother/SmootherTakeCPU/smoother.h" +#include "../../include/Smoother/SmootherTakeGPU/smoother.h" + +#include + +namespace SmootherTest +{ + + Vector generate_random_sample_data(const PolarGrid& grid, unsigned int seed) + { + Vector x(grid.numberOfNodes()); + std::mt19937 gen(seed); + std::uniform_real_distribution dist(0.0, 1.0); + for (int i = 0; i < x.size(); ++i) { + x[i] = dist(gen); + } + return x; + } + + TEST(SmootherTest, applySmoother_DirBC_Interior) + { + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = true; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + SmootherTakeCPU op_smootherTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_smootherTakeCPU.smoothingInPlace(x, rhs, temp); + + result = x; + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 4; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + GPU_Vector gpu_temp(temp.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + copyHostToDevice(temp, gpu_temp); + + SmootherTakeGPU op_smootherTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_smootherTakeGPU.smoothingInPlace(gpu_x, gpu_rhs, gpu_temp); + + host_result = Vector(gpu_x.size()); + copyDeviceToHost(gpu_x, host_result); + } + + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-8; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } + + + TEST(SmootherTest, applySmoother_AcrossOrigin) + { + // Parameters + ExtrapolationType extrapolation = ExtrapolationType::NONE; + int FMG = 0; + bool DirBC_Interior = false; + int num_omp_threads = 16; + omp_set_num_threads(num_omp_threads); + + Vector result; + Vector host_result; + + // CPU Processing + { + ProcessingType processing_type = ProcessingType::CPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 5; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto CPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(CPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + SmootherTakeCPU op_smootherTakeCPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_smootherTakeCPU.smoothingInPlace(x, rhs, temp); + + result = x; + } + + // GPU Processing + { + ProcessingType processing_type = ProcessingType::GPU; + DomainGeometry domain_geometry; + DensityProfileCoefficients density_profile_coefficients; + + const double R0 = 0.1; + const double Rmax = 1.3; + const int nr_exp = 4; + const int ntheta_exp = -1; + const double refinement_radius = 0.5; + const int anisotropic_factor = 2; + const int divideBy2 = 5; + + auto grid = std::make_unique(R0, Rmax, nr_exp, ntheta_exp, refinement_radius, anisotropic_factor, divideBy2, 0.5); + + auto GPU_levelCache = std::make_unique(processing_type, *grid, density_profile_coefficients, domain_geometry); + + Level level(0, processing_type, std::move(grid), std::move(GPU_levelCache), extrapolation, FMG); + + // Generate random data using the level's grid (GPU-compatible) + Vector x = generate_random_sample_data(level.grid(), 42); + Vector rhs = generate_random_sample_data(level.grid(), 69); + Vector temp = generate_random_sample_data(level.grid(), 187); + + GPU_Vector gpu_x(x.size()); + GPU_Vector gpu_rhs(rhs.size()); + GPU_Vector gpu_temp(temp.size()); + copyHostToDevice(x, gpu_x); + copyHostToDevice(rhs, gpu_rhs); + copyHostToDevice(temp, gpu_temp); + + SmootherTakeGPU op_smootherTakeGPU(level, domain_geometry, density_profile_coefficients, DirBC_Interior); + + op_smootherTakeGPU.smoothingInPlace(gpu_x, gpu_rhs, gpu_temp); + + host_result = Vector(gpu_x.size()); + copyDeviceToHost(gpu_x, host_result); + } + + + ASSERT_EQ(result.size(), host_result.size()); + + double tolerance = 1e-8; + for (size_t i = 0; i < result.size(); ++i) { + ASSERT_NEAR(result[i], host_result[i], tolerance); + } + } +} + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/tests/comparetest.cpp b/tests/comparetest.cpp deleted file mode 100644 index 5c01b8c0..00000000 --- a/tests/comparetest.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include -#include -#include -#include "cmdline.h" -#include "gmgpolar.h" - -class Test_Parameters : public ::testing::Test -{ -protected: - void SetUp() override - { - //Results of the run with default parameters. - input.assign({5, 0, 0, 4, 4, 3, 0, 1, 0, 3136, 49, 64, 4, 12}); - - initparam = 9; - int initarr[initparam] = {Param::prob, Param::alpha_coeff, Param::beta_coeff, - Param::nr_exp, Param::ntheta_exp, Param::fac_ani, - Param::mod_pk, Param::DirBC_Interior, Param::divideBy2}; - data.resize(initparam); - std::copy(initarr, initarr + initparam, data.begin()); - - //Initializing default parameters - gyro::init_params(); - gyro::icntl[Param::verbose] = 0; - gyro::icntl[Param::debug] = 0; - gyro::icntl[Param::extrapolation] = 0; - gyro::icntl[Param::DirBC_Interior] = 1; - gyro::icntl[Param::check_error] = 1; - gyro::dcntl[Param::R0] = 1e-5; - gyro::f_grid_r = ""; - gyro::f_grid_theta = ""; - gyro::f_sol_in = ""; - gyro::f_sol_out = ""; - gyro::icntl[Param::nr_exp] = 4; - gyro::icntl[Param::ntheta_exp] = 4; - gyro::icntl[Param::fac_ani] = 3; - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - } - - int initparam; - std::vector input; - std::vector data; -}; - -TEST_F(Test_Parameters, Initialize_Parameters) -{ - for (int z = 0; z < initparam; z++) { - ASSERT_EQ(gyro::icntl[data[z]], input[z]) << "Initial data is not assigned properly"; - } -} - -TEST_F(Test_Parameters, DOF_on_finest_grid) -{ - gmgpolar gmgtest; - gmgtest.levels_orig = 1; // set levels_orig to prevent segfaulting in deconstructor. See issue #46. - gmgtest.create_grid_polar(); // only the finest grid is now created - EXPECT_EQ(gmgtest.v_level.size(), 1); - int nodes_r = gmgtest.v_level[0]->nr; - int nodes_theta = gmgtest.v_level[0]->ntheta; - int finest_nodes = nodes_r * nodes_theta; - EXPECT_EQ(finest_nodes, input[initparam]); - EXPECT_EQ(nodes_r, input[initparam + 1]); - EXPECT_EQ(nodes_theta, input[initparam + 2]); -} - -TEST_F(Test_Parameters, Test_multigrid_Iterations) -{ - gmgpolar gmgtest2; - gmgtest2.create_grid_polar(); - gmgtest2.polar_multigrid(); - - EXPECT_EQ(gmgtest2.levels, input[initparam + 3]); - int iterations = - gyro::icntl[Param::extrapolation] < 2 ? gmgtest2.nrm_2_res.size() - 1 : gmgtest2.nrm_2_err.size() - 1; - EXPECT_EQ(iterations, input[input.size() - 1]) << "Multigrid iterations do not match"; -} \ No newline at end of file diff --git a/tests/mockgrid.cpp b/tests/mockgrid.cpp deleted file mode 100644 index 4efe7a81..00000000 --- a/tests/mockgrid.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "mockgrid.h" -void create_grid(gmgpolar& test_p) -{ - time_t seed = 5000; - std::default_random_engine gen(seed); //deterministic seed to reproduce - std::uniform_real_distribution dis(gyro::dcntl[Param::R0], gyro::dcntl[Param::R]); - std::uniform_real_distribution theta_distribution(0, 2 * PI); - - std::cout << "creating randomized grid with std::default_random_engine seed " + std::to_string(seed) << std::endl; - level* new_level = new level(0); - new_level->nr = pow(2, gyro::icntl[Param::nr_exp]); - new_level->r = std::vector(new_level->nr + 1); - - std::vector rands(new_level->nr - 1); - for (int j = 0; j < new_level->nr - 1; ++j) { - rands[j] = dis(gen); - } - std::sort(rands.begin(), rands.end()); - new_level->r[0] = gyro::dcntl[Param::R0]; - for (int i = 1; i < new_level->nr; i++) { - new_level->r[i] = rands[i - 1]; //random grid on coarser level - } - new_level->r[new_level->nr] = gyro::dcntl[Param::R]; - new_level->nr++; - int ntmp = pow(2, ceil(log2(new_level->nr))); - new_level->ntheta = gyro::icntl[Param::periodic] ? ntmp : ntmp + 1; - - new_level->theta = std::vector(new_level->ntheta); - - std::vector randst(ntmp - 1); - for (int k = 0; k < ntmp - 1; ++k) { - randst[k] = theta_distribution(gen); - } - std::sort(randst.begin(), randst.end()); - new_level->theta[0] = 0; - for (int i = 1; i < ntmp; i++) { - new_level->theta[i] = randst[i - 1]; - } - if (!gyro::icntl[Param::periodic]) { - new_level->theta[ntmp] = 2 * PI; - } - - new_level->ntheta_int = gyro::icntl[Param::periodic] ? new_level->ntheta : new_level->ntheta - 1; - new_level->nr_int = new_level->nr - 1; - - new_level->thetaplus = std::vector(new_level->ntheta_int); - for (int k = 0; k < new_level->ntheta_int - 1; k++) { - new_level->thetaplus[k] = new_level->theta[k + 1] - new_level->theta[k]; - } - new_level->thetaplus[new_level->ntheta_int - 1] = 2 * PI - new_level->theta[new_level->ntheta_int - 1]; - - new_level->hplus = std::vector(new_level->nr_int); - for (int k = 0; k < new_level->nr_int; k++) { - new_level->hplus[k] = new_level->r[k + 1] - new_level->r[k]; - } - - level* coarser_level = new level(1); - coarser_level->nr = pow(2, gyro::icntl[Param::nr_exp] - 1) + 1; - ntmp = pow(2, ceil(log2(coarser_level->nr))); - coarser_level->ntheta = gyro::icntl[Param::periodic] ? ntmp : ntmp + 1; - - coarser_level->ntheta_int = gyro::icntl[Param::periodic] ? coarser_level->ntheta : coarser_level->ntheta - 1; - coarser_level->nr_int = coarser_level->nr - 1; - test_p.v_level.push_back(new_level); - test_p.v_level.push_back(coarser_level); - test_p.levels_orig = 2; -} \ No newline at end of file diff --git a/tests/mockgrid.h b/tests/mockgrid.h deleted file mode 100644 index 0d000a14..00000000 --- a/tests/mockgrid.h +++ /dev/null @@ -1,11 +0,0 @@ -#include "gmgpolar.h" -#include -#include -#include - -#ifndef MOCKGRID_H - #define MOCKGRID_H - -void create_grid(gmgpolar& test_p); - -#endif \ No newline at end of file diff --git a/tests/test_prolongation.cpp b/tests/test_prolongation.cpp deleted file mode 100644 index a78f4f1a..00000000 --- a/tests/test_prolongation.cpp +++ /dev/null @@ -1,299 +0,0 @@ -#include -#include -#include "gmgpolar.h" -#include "mockgrid.h" -class test_prolongation - : public ::testing::TestWithParam< - std::tuple> //tuple includes data on grid size and Dirichlet boundary conditions -{ -protected: - void SetUp() override - { - //initialize default parameters. - gyro::init_params(); - gyro::icntl[Param::verbose] = 0; - gyro::dcntl[Param::R0] = 1e-5; - gyro::icntl[Param::periodic] = 1; - gyro::f_grid_r = ""; - gyro::f_grid_theta = ""; - gyro::f_sol_in = ""; - gyro::f_sol_out = ""; - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - } -}; - -/*! - * \brief Test the bilinear prolongation operator used in the multigrid cycle coarse-grid correction. - * - * The Test creates an arbitrary grid-function on the coarser level and prolongates it. - * On the fine level we iterate over all nodes and test the result based on whether the node is fine in theta, r or in both. - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_prolongation, test_bilinear_prolongation) -{ - //we vary the grid size to guarantee that the problem works for all sizes - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - create_grid(test_p); - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; //number of coarse nodes in theta direction - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; //fine grid size - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; //coarser grid size - - std::vector u_test(p_level.mc); - for (int z = 0; z < p_level.mc; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - - std::vector sol = - p_level.apply_prolongation_bi(u_test); //apply prolongation operator on arbitrary grid-function - - for (int j = 0; j < p_level.nr_int + 1; j++) { - for (int i = 0; i < p_level.ntheta_int; i++) { - if (j % 2 == 0 && i % 2 == 0) { //testing coarse node injection - EXPECT_EQ(u_test[(j / 2) * ctheta_int + (i / 2)], sol[j * p_level.ntheta_int + i]) - << "coarse node injection is failing"; - } - else if (i % 2 != 0 && j % 2 == 0) { - // as numbering in angle (theta_i) is odd, we have a fine node with - // coarse neighbors at (r_j, theta_i - k_{i-1}) and (r_j, theta_i + k_i) - - double k_qm1 = p_level.theta[i] - p_level.theta[i - 1]; //calculate k_{q-1} - double k_q = (i < p_level.ntheta_int - 1) ? p_level.theta[i + 1] - p_level.theta[i] - : 2 * PI - p_level.theta[i]; //k_q - - int i1 = (j / 2) * ctheta_int + (i - 1) / 2; //bottom coarse node in theta - int i2 = (i < p_level.ntheta_int - 1) ? i1 + 1 : (j / 2) * ctheta_int; //top coarse node in theta - - double val = (k_q * u_test[i1] + k_qm1 * u_test[i2]); - - EXPECT_NEAR(val, (k_q + k_qm1) * sol[j * p_level.ntheta_int + i], - 1e-12) //compare values as in the paper - << "Bilinear Prolongation fails for Index (r,theta) : (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - ; - } - else if (i % 2 == 0 && j % 2 != 0) { - // as numbering in radius (r_j) is odd, we have a fine node with - // coarse neighbors at (r_j - h_{j-1}, theta_i) and (r_j+h_j, theta_i ) - double h_pm1 = p_level.r[j] - p_level.r[j - 1]; //h_{p-1} - double h_p = p_level.r[j + 1] - p_level.r[j]; //h_p - - double v1 = u_test[(j - 1) / 2 * ctheta_int + (i / 2)]; // left coarse node in r - double v2 = u_test[(j + 1) / 2 * ctheta_int + (i / 2)]; // right coarse node in r - - double val = (h_p * v1 + h_pm1 * v2); - - EXPECT_NEAR(val, (h_p + h_pm1) * sol[j * p_level.ntheta_int + i], 1e-12) //compare values - << "Bilinear Prolongation fails for Index (r,theta) : (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - ; - } - else // both are fine nodes - { - double h_pm1 = p_level.r[j] - p_level.r[j - 1]; - double h_p = p_level.r[j + 1] - p_level.r[j]; - - double k_qm1 = p_level.theta[i] - p_level.theta[i - 1]; - double k_q = - (i < p_level.ntheta_int - 1) ? p_level.theta[i + 1] - p_level.theta[i] : 2 * PI - p_level.theta[i]; - - /*the stencil-corners corresponding to the values (r_j,theta_i)*/ - /*bottom corresponds to lower indices in theta direction. left to lower indices in radius direction*/ - - double bottom_left; - double top_left; - double bottom_right; - double top_right; - ASSERT_NE(p_level.nr_int - 1, 1); - - if (i < p_level.ntheta - 1) { - bottom_left = u_test[((j - 1) / 2) * ctheta_int + (i - 1) / 2]; - top_left = u_test[((j - 1) / 2) * ctheta_int + (i + 1) / 2]; - bottom_right = u_test[((j + 1) / 2) * ctheta_int + (i - 1) / 2]; - top_right = u_test[((j + 1) / 2) * ctheta_int + (i + 1) / 2]; - } - else { - bottom_left = u_test[((j - 1) / 2) * ctheta_int + (i - 1) / 2]; - top_left = u_test[((j - 1) / 2) * ctheta_int]; - bottom_right = u_test[((j + 1) / 2) * ctheta_int + (i - 1) / 2]; - top_right = u_test[((j + 1) / 2) * ctheta_int]; - } - - double val = ((h_p * k_q * bottom_left) + (h_p * k_qm1 * top_left) + (h_pm1 * k_q * bottom_right) + - (h_pm1 * k_qm1 * top_right)); //calculate value as in the paper - - EXPECT_NEAR(val, (h_p + h_pm1) * (k_q + k_qm1) * sol[j * p_level.ntheta_int + i], 1e-12) - << "Bilinear Prolongation fails for Index (r,theta) : (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - } - } - } -} - -/*! - * \brief Test the injection prolongation operator used in the implicit extrapolation step of the multigrid-cycle. - * - * The Test creates an arbitrary grid-function on the coarser level and injects it. - * On the fine level we iterate over all nodes and test the result based on whether the node is fine or not. - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_prolongation, test_injection_prolongation) -{ - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - - create_grid(test_p); - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; // number of coarse nodes in theta direction - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; // fine grid size - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; // coarser grid size - - std::vector u_test(p_level.mc); - for (int z = 0; z < p_level.mc; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - - std::vector sol = p_level.apply_prolongation_inj(u_test); - - EXPECT_EQ((int)sol.size(), p_level.m); - //testing the embedding. since we embed the coarse gird function, the values of the fine node should be zero - for (int j = 0; j < p_level.nr_int + 1; j++) { - for (int i = 0; i < p_level.ntheta_int; i++) { - if (j % 2 == 0 && i % 2 == 0) { - EXPECT_EQ(u_test[(j / 2) * ctheta_int + (i / 2)], sol[j * p_level.ntheta_int + i]) - << "The Injection value fails at Index (r,theta): (" + std::to_string(j) + "," + std::to_string(i) + - ")"; - } - else { - EXPECT_EQ(sol[j * p_level.ntheta_int + i], 0); //fine nodes set to zero. - } - } - } -} -/*! - * \brief Test the extrapolation prolongation operator used in the implicit extrapolation step of the multigrid-cycle. - * - * The Test creates an arbitrary grid-function on the coarser level and prolongates it. - * On the fine level we iterate over all nodes and test the result based on whether the node is fine in theta, r or in both. - * The value is determined by a Triangulation of the grid on the coarser level. - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_prolongation, test_extrapolation_prolongation) -{ - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - - create_grid(test_p); - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; // number of coarse nodes in theta direction - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; // number of nodes on fine level - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; // number of nodes on coarse level - - std::vector u_test(p_level.mc); - for (int z = 0; z < p_level.mc; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - std::vector sol = p_level.apply_prolongation_ex(u_test); - - for (int j = 0; j < p_level.nr_int + 1; j++) { - for (int i = 0; i < p_level.ntheta_int; i++) { - if (j % 2 == 0 && i % 2 == 0) { //coarse node injection - EXPECT_EQ(u_test[(j / 2) * ctheta_int + (i / 2)], sol[j * p_level.ntheta_int + i]) - << "coarse node injection is failing"; - } - else if (i % 2 != 0 && j % 2 == 0) { - // as numbering in angle (theta_i) is odd, we have a fine node with - // coarse neighbors at (r_j, theta_i - k_{i-1}) and (r_j, theta_i + k_i) - - int i1 = (j / 2) * ctheta_int + (i - 1) / 2; // bottom coarse node in theta - int i2 = (i < p_level.ntheta_int - 1) ? i1 + 1 : (j / 2) * ctheta_int; // top coarse node in theta - - double val = 0.5 * (u_test[i1] + u_test[i2]); - - EXPECT_NEAR(val, sol[j * p_level.ntheta_int + i], 1e-12) - << "Extrapolated Prolongation fails for Index (r,theta): (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - } - else if (i % 2 == 0 && j % 2 != 0) { - // as numbering in radius (r_j) is odd, we have a fine node with - // coarse neighbors at (r_j - h_{j-1}, theta_i) and (r_j+h_j, theta_i ) - - double v1 = u_test[(j - 1) / 2 * ctheta_int + (i / 2)]; // left coarse node in r - double v2 = u_test[(j + 1) / 2 * ctheta_int + (i / 2)]; // right coarse node in r - - double val = 0.5 * (v1 + v2); - - EXPECT_NEAR(val, sol[j * p_level.ntheta_int + i], 1e-12) - << "Extrapolated Prolongation fails for Index (r,theta): (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - } - else // both are fine nodes - { - - /*in the triangulation we now consider that the fine node is on the hypothenuse of the triangle. - The corresponding coarse nodes are located on the triangles nodes that span the hypothenuse */ - - double top_left; - double bottom_right; - - if (i < p_level.ntheta_int - 1) { - top_left = u_test[((j - 1) / 2) * ctheta_int + (i + 1) / 2]; - bottom_right = u_test[((j + 1) / 2) * ctheta_int + (i - 1) / 2]; - } - else { - top_left = u_test[((j - 1) / 2) * ctheta_int]; - bottom_right = u_test[((j + 1) / 2) * ctheta_int + (i - 1) / 2]; - } - - double val = 0.5 * (top_left + bottom_right); - - EXPECT_NEAR(val, sol[j * p_level.ntheta_int + i], 1e-12) - << "Extrapolated Prolongation fails for Index (r,theta): (" + std::to_string(j) + "," + - std::to_string(i) + ")"; - ; - } - } - } -} - -INSTANTIATE_TEST_SUITE_P(Prolongation_size, test_prolongation, - ::testing::Values(std::make_tuple(0, false), std::make_tuple(1, false), - std::make_tuple(2, false), std::make_tuple(3, false), - std::make_tuple(4, false), std::make_tuple(5, false), - std::make_tuple(6, false), std::make_tuple(7, false), - std::make_tuple(8, false), std::make_tuple(0, true), - std::make_tuple(1, true), std::make_tuple(2, true), std::make_tuple(3, true), - std::make_tuple(4, true), std::make_tuple(5, true), std::make_tuple(6, true), - std::make_tuple(7, true), std::make_tuple(8, true))); \ No newline at end of file diff --git a/tests/test_restriction.cpp b/tests/test_restriction.cpp deleted file mode 100644 index 479d2dc8..00000000 --- a/tests/test_restriction.cpp +++ /dev/null @@ -1,295 +0,0 @@ -#include -#include "gmgpolar.h" -#include "mockgrid.h" -class test_restriction : public ::testing::TestWithParam> -{ -protected: - void SetUp() override - { - //initialize default parameters. - gyro::init_params(); - gyro::icntl[Param::verbose] = 0; - gyro::dcntl[Param::R0] = 1e-5; - gyro::f_grid_r = ""; - gyro::f_grid_theta = ""; - gyro::f_sol_in = ""; - gyro::f_sol_out = ""; - gyro::select_functions_class(gyro::icntl[Param::alpha_coeff], gyro::icntl[Param::beta_coeff], - gyro::icntl[Param::mod_pk], gyro::icntl[Param::prob]); - } -}; -/*! - * \brief Test the bilinear restriction operator used in the multigrid cycle coarse-grid correction. - * - * The test creates an arbitrary grid-function on the finer level and restricts it to the coarser level. - * On the coarse level we iterate over all nodes and accumulate the adjacent fine node values. - * This is matrix-free but it corresponds to applying the transposed prolongation matrix - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_restriction, test_bilinear_restriction) -{ - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - - create_grid(test_p); //Mocking create_grid_polar, check_geom and define_coarse_nodes - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; // number of coarse nodes in theta direction - int cr_int = test_p.v_level[1]->nr_int; - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; //fine grid size - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; //coarser grid size - - std::vector u_test(p_level.m); - for (int z = 0; z < p_level.m; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - - std::vector sol = p_level.apply_restriction_bi(u_test); - - /* - * The restriction operator accumulates the values in the direct vicinity and stores them in the corresponding node. - * These values are the eight fine nodes' value in the vicinity that are to be accumulated in the coarse node. - * - * We treat values in r as the x-axis. values in theta as the y-axis. Hence the vector 'adjacent' stores the values in the order: - * bottom_left, left, top_left, bottom, top, bottom_right, right, top_right, i.e. - * ^ --- 2 --- 4 --- 7 - * | --- 1 --- x --- 6 - * theta --- 0 --- 3 --- 5 - * | ------- r ------> - */ - - for (int j = 0; j < cr_int + 1; j++) { - for (int i = 0; i < ctheta_int; i++) { - std::vector adjacent(8, -1.0); - if (j == 0) { // innermost circle: nodes to the left (lower in radii indices) disappear - adjacent[0] = 0.0; - adjacent[1] = 0.0; - adjacent[2] = 0.0; - } - if (j == cr_int) { // outermost circle: nodes to the right disappear - adjacent[5] = 0.0; - adjacent[6] = 0.0; - adjacent[7] = 0.0; - } - - int k = 0; - // Store h_j,h_j-1 and k_i, k_i-1 for all adjacent nodes in the order as given above - std::vector> h_p(8, {-1, -1}); // (h_p, h_{p-1}) relative grid sizes - std::vector> k_q(8, {-1, -1}); // (k_q, k_{q-1}) - // z and y represent relative positions to the coarse node. e.g. if (z,y)=(-1,1) then we consider the fine node to the top-left - for (int z = -1; z < 2; z++) { - for (int y = -1; y < 2; y++) { - if (z != 0 || y != 0) { - if (adjacent[k] != 0.0) { - - adjacent[k] = - u_test[(2 * j + z) * p_level.ntheta_int + - ((i != 0 || y > -1) - ? (2 * i + y) - : p_level.ntheta_int - - 1)]; //adjacent value. consider periodic boundary in theta direction - - h_p[k] = {p_level.r[2 * j + z + 1] - p_level.r[2 * j + z], - p_level.r[2 * j + z] - - p_level.r[2 * j + z - 1]}; //distance in r coordinate for the adjacent node - - //to calculate k_q,k_{q-1} we consider the special case i=0 (2*i+y=y) separately. - if (i > 0) { - double indx = - (2 * i + y < p_level.ntheta_int - 1) ? p_level.theta[2 * i + y + 1] : 2 * PI; - - k_q[k] = {indx - p_level.theta[2 * i + y], - p_level.theta[2 * i + y] - p_level.theta[2 * i + y - 1]}; - } - else { - if (y == - 1) { //based on the value of y and periodic boundary conditions we get different values for {k_q,k_{q-1}} - k_q[k] = {p_level.theta[2] - p_level.theta[1], p_level.theta[1] - p_level.theta[0]}; - } - else if (y == 0) { - k_q[k] = {p_level.theta[1] - p_level.theta[0], - 2 * PI - p_level.theta[p_level.ntheta_int - 1]}; - } - else { - k_q[k] = {2 * PI - p_level.theta[p_level.ntheta_int - 1], - p_level.theta[p_level.ntheta_int - 1] - - p_level.theta[p_level.ntheta_int - 2]}; - } - } - } - k += 1; - } - } - } - /*values given by the operator. We multiply this with the grid-function value of the corresponding adjacent node*/ - - std::vector coeffs_hk{ - std::get<1>(h_p[0]) * std::get<1>(k_q[0]) / - ((std::get<0>(h_p[0]) + std::get<1>(h_p[0])) * (std::get<0>(k_q[0]) + std::get<1>(k_q[0]))), - std::get<1>(h_p[1]) / (std::get<0>(h_p[1]) + std::get<1>(h_p[1])), - std::get<1>(h_p[2]) * std::get<0>(k_q[2]) / - ((std::get<0>(h_p[2]) + std::get<1>(h_p[2])) * (std::get<0>(k_q[2]) + std::get<1>(k_q[2]))), - std::get<1>(k_q[3]) / (std::get<0>(k_q[3]) + std::get<1>(k_q[3])), - std::get<0>(k_q[4]) / (std::get<0>(k_q[4]) + std::get<1>(k_q[4])), - std::get<0>(h_p[5]) * std::get<1>(k_q[5]) / - ((std::get<0>(h_p[5]) + std::get<1>(h_p[5])) * (std::get<0>(k_q[5]) + std::get<1>(k_q[5]))), - std::get<0>(h_p[6]) / (std::get<0>(h_p[6]) + std::get<1>(h_p[6])), - std::get<0>(h_p[7]) * std::get<0>(k_q[7]) / - ((std::get<0>(h_p[7]) + std::get<1>(h_p[7])) * (std::get<0>(k_q[7]) + std::get<1>(k_q[7])))}; - - double finval = u_test[(2 * j) * p_level.ntheta_int + (2 * i)]; - for (int z = 0; z < 8; z++) { - finval += coeffs_hk[z] * adjacent[z]; //accumulate all values in the coarse node - } - EXPECT_NEAR(finval, sol[j * ctheta_int + i], 1e-10) - << "The test fails at Index for (r,theta): (" + std::to_string(j) + "," + std::to_string(i) + ")"; - } - } -} - -/*! - * \brief Test the injection restriction operator used in the implicit extrapolation step of the multigrid cycle. - * - * The Test creates an arbitrary grid-function on the finer level and restricts it. - * In this case this just corresponds to projecting the grid-function onto the coarse level. - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_restriction, test_injection_restriction) -{ - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - - create_grid(test_p); - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; - int cr_int = test_p.v_level[1]->nr_int; - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; //number of nodes on fine level - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; //number of nodes on coarse level - - std::vector u_test(p_level.m); - for (int z = 0; z < p_level.m; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - - std::vector sol = p_level.apply_restriction_inj(u_test); - - EXPECT_EQ((int)sol.size(), p_level.mc); - - for (int j = 0; j < cr_int + 1; j++) { - for (int i = 0; i < ctheta_int; i++) { - EXPECT_EQ(sol[j * ctheta_int + i], u_test[(2 * j) * p_level.ntheta_int + (2 * i)]) - << "The injection restriction fails at Index (r,theta): (" + std::to_string(j) + "," + - std::to_string(i) + ")"; //test all values - } - } -} - -/*! - * \brief Test the extrapolation restriction operator used in the implicit extrapolation step of the multigrid cycle. - * - * The Test creates an arbitrary grid-function on the finer level and restricts it. - * On the coarse level we iterate over all nodes and accumulate the adjacent fine node values based on the triangulation. - * We hence only consider 6 adjacent fine nodes, which lie on one of the edges spanned by the corresponding coarse node. - * This is matrix-free but it corresponds to applying the transposed prolongation matrix - * - * Parametrized tests are used to test for different grid sizes and with or without Dirichlet boundary conditions. - */ - -TEST_P(test_restriction, test_extrapolation_restriction) -{ - gyro::icntl[Param::nr_exp] = (int)(std::get<0>(GetParam()) / 3) + 3; - gyro::icntl[Param::ntheta_exp] = (std::get<0>(GetParam()) % 3) + 3; - gyro::icntl[Param::DirBC_Interior] = std::get<1>(GetParam()); - - gmgpolar test_p; - - create_grid(test_p); - - level& p_level = *(test_p.v_level[0]); - int ctheta_int = test_p.v_level[1]->ntheta_int; - int cr_int = test_p.v_level[1]->nr_int; - - p_level.m = test_p.v_level[0]->nr * test_p.v_level[0]->ntheta; //number of nodes on fine level - p_level.mc = test_p.v_level[1]->nr * test_p.v_level[1]->ntheta; //number of nodes on coarse level - - std::vector u_test(p_level.m); - for (int z = 0; z < p_level.mc; z++) { - u_test[z] = - 1 - z + - pow(PI, - -z * z); //constructing arbitrary grid-function on coarse level to test our prolongation operator with. - } - - std::vector sol = p_level.apply_restriction_ex(u_test); - - /* based on the triangulation, at most 6 adjacent fine nodes are considered: - * **left,top_left,bottom,top,bottom_right,right** - */ - for (int j = 0; j < cr_int + 1; j++) { - for (int i = 0; i < ctheta_int; i++) { - std::vector adjacent(6, -1.0); - if (j == 0) { // innermost circle - adjacent[0] = 0.0; - adjacent[1] = 0.0; - } - if (j == cr_int) { // outermost circle - adjacent[4] = 0.0; - adjacent[5] = 0.0; - } - - int k = 0; - //relative values of the fine nodes as in bilinear restriction - for (int z = -1; z < 2; z++) { - for (int y = -1; y < 2; y++) { - if ((z != 0 || y != 0) && (z * y != 1)) { - if (adjacent[k] != 0.0) { - - adjacent[k] = u_test[(2 * j + z) * p_level.ntheta_int + - ((i != 0 || y > -1) ? (2 * i + y) : p_level.ntheta_int - 1)]; - } - k += 1; - } - } - } - - double finval = u_test[(2 * j) * p_level.ntheta_int + (2 * i)]; - for (int z = 0; z < 6; z++) { - finval += - 0.5 * - adjacent[z]; // accumulate the values. the vector "coeffs_hk" reduces to 1/2 for every adjacent fine node - } - - EXPECT_NEAR(finval, sol[j * ctheta_int + i], 1e-12) - << "The test fails at Index for (r,theta): (" + std::to_string(j) + "," + std::to_string(i) + ")"; - } - } -} - -INSTANTIATE_TEST_SUITE_P(Restriction_size, test_restriction, - ::testing::Values(std::make_tuple(0, false), std::make_tuple(1, false), - std::make_tuple(2, false), std::make_tuple(3, false), - std::make_tuple(4, false), std::make_tuple(5, false), - std::make_tuple(6, false), std::make_tuple(7, false), - std::make_tuple(8, false), std::make_tuple(0, true), - std::make_tuple(1, true), std::make_tuple(2, true), std::make_tuple(3, true), - std::make_tuple(4, true), std::make_tuple(5, true), std::make_tuple(6, true), - std::make_tuple(7, true), std::make_tuple(8, true))); \ No newline at end of file diff --git a/thirdparty/CMakeLists.txt b/third-party/CMakeLists.txt similarity index 99% rename from thirdparty/CMakeLists.txt rename to third-party/CMakeLists.txt index e4c4ede3..9bf57311 100644 --- a/thirdparty/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -1,6 +1,5 @@ message(STATUS "Adding GoogleTest") - include(FetchContent) FetchContent_Declare( googletest diff --git a/treat_output.py b/treat_output.py deleted file mode 100644 index a2f9e1a3..00000000 --- a/treat_output.py +++ /dev/null @@ -1,125 +0,0 @@ -#read the txt.file with the terminal outputs and process them - -file = 'output.txt' -open(file, 'r') - -lines = [] - -with open(file) as f: - lines = f.readlines() - -f.close() - -#create new file for latex code -latex = open('latex.txt', 'w') - - - - -count = 0 -number = 0 - -for line in lines: - count += 1 - - problem = line.find('Problem size') - if (problem != -1): - number += 1 - print(f'{line[:-1]}') #-1 to leave out the break at the end of the line - - latex.write("\\begin{table} \n \\begin{tabular}[c]{c|ccccc} \n ") - latex.write("\multicolumn{5}{c}") - - - if(number == 1): - latex.write("{r0=1e-8, Circle geometry, Diriclet boundary condition}") - elif(number == 2): - latex.write("{r0=1e-8, Circle geometry, Across-the-origin discretization}") - elif (number == 3): - latex.write("{r0=1e-8, Deformed geometry, Diriclet boundary condition}") - elif (number == 4): - latex.write("{r0=1e-8, Deformed geometry, Across-the-origin discretization}") - elif (number == 5): - latex.write("{r0=1e-5, Circle geometry, Diriclet boundary condition}") - elif (number == 6): - latex.write("{r0=1e-5, Circle geometry, Across-the-origin discretization}") - elif (number == 7): - latex.write("{r0=1e-5, Deformed geometry, Diriclet boundary condition}") - elif (number == 8): - latex.write("{r0=1e-5, Deformed geometry, Across-the-origin discretization}") - elif (number == 9): - latex.write("{r0=1e-2, Circle geometry, Diriclet boundary condition}") - elif (number == 10): - latex.write("{r0=1e-2, Circle geometry, Across-the-origin discretization}") - elif (number == 11): - latex.write("{r0=1e-2, Deformed geometry, Diriclet boundary condition}") - elif (number == 12): - latex.write("{r0=1e-2, Deformed geometry, Across-the-origin discretization}") - - - latex.write("\\\\ \n \cline{1-6} \n") - latex.write(" $n_r\\times n_\\theta$ & its & $\widehat{\\rho}$ & $\|err\|_{\ell_2}$ & $\|err\|_{\infty}$ & time \\\\ \n") - latex.write("\cline{1-6} \n") - latex.write(" 5$\\times$8 & ") - - - convergence = line.find('Convergence after') - if (convergence != -1): - #print(f'{line}') - #number_of_conv is found at: convergence+28, until the end - conv = line[convergence+28:-1] #take a substring from the line - #print("conv = ", conv) - latex.write(conv) - latex.write(" & ") - - residual = line.find('rho =') - if (residual != -1): - #print(f'{line}') - #mean residual reduction factor is found at: residual+38, until the end - rho = line[residual+6:-1] - #print("rho = ", rho) - latex.write(rho) - latex.write(" & ") - - norm_2 = line.find('2-norm of error =') - if (norm_2 != -1): - #print(f'{line}') - #error is found at: norm_2+18, until the end - error_2_norm = line[norm_2+18:-1] - #print("error_2_norm = ", error_2_norm) - latex.write(error_2_norm) - latex.write(" & ") - - norm_inf = line.find('inf-norm of error =') - if (norm_inf != -1): - #print(f'{line}') - #error is found at: norm_inf+20 - error_norm_inf = line[norm_inf+20:-1] - #print("error_inf_norm = ", error_norm_inf) - latex.write(error_norm_inf) - latex.write(" & ") - - time = line.find('Total execution time:') - if (time != -1): - #print(f'{line}') - #execution time is found at: time+22, until the end - t = line[time+22:] - #print("time = ", t) - latex.write(t) - latex.write(" \\\\ \n \cline{1-6} \n") - - latex.write("\end{tabular} \n \caption{\\textbf{Multigrid without extrapolation}. Iteration counts $\\textit{its}$, mean residual reduction factor $\widehat{\\rho}$, and errors of iterative solution to exact solution evaluated at the nodes in $\| \cdot \|_{\ell_2}$ and $\|\cdot\|_{\infty}$ norms.} \n") - latex.write("\end{table}") - - -print("done!") - - - - - - - - - -